﻿@import url('open-iconic/font/css/open-iconic-bootstrap.min.css');

html, body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.main {
    background: transparent;
}

a, .btn-link {
    color: #4f46e5;
    text-decoration: none;
}

a:hover, .btn-link:hover {
    color: #3730a3;
    text-decoration: underline;
}

.btn-primary {
    color: #fff;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 12px;
    padding: 10px 20px;
    font-weight: 600;
    min-height: 40px;
    transition: all 0.2s ease;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.content {
    padding-top: 1.1rem;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

.parent-horizontal-stack {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    min-height: 40px;
}

.parent-horizontal-stack .col-1 {
    flex: 0 0 auto;
}

.parent-horizontal-stack .col {
    flex: 1;
    min-width: 0; /* Allows text to wrap */
}

.parent-horizontal-stack .col-2 {
    flex: 0 0 auto;
}

.btn-group {
    display: flex;
    gap: 4px;
    align-items: center;
}

.editButtonStyle {
    margin: 0;
    min-width: 32px;
    min-height: 32px;
}

/* Mobile-specific improvements */
@media (max-width: 768px) {
    .card-maincontainer {
        padding: 8px;
    }
    
    .card {
        margin: 8px 0;
        padding: 12px;
    }
    
    .card h2 {
        font-size: 18px;
        margin-bottom: 10px;
    }
    
    .todo-list li {
        padding: 4px 0;
        min-height: 36px;
    }
    
    .todo-list li a {
        padding: 4px 4px;
        font-size: 16px;
        font-weight: 600;
    }
    
    .parent-horizontal-stack {
        gap: 6px;
    }
    
    .btn-group {
        gap: 2px;
    }
    
    .editButtonStyle {
        min-width: 28px;
        min-height: 28px;
    }
}

.parent-horizontal-stack-end {
    display: flex;
    flex-wrap: wrap;
    /* for horizontal aligning of child divs */
    justify-content: flex-end;
    /* for vertical aligning */
    align-items: center;
}
.contenAlignCenter {
    align-items: center;
}
.editButtonStyle {
    margin-left: 2px;
    margin-right: 2px;
}
child-horizontal-stack {
    width: 100px;
}

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }


/*html,
body {
    margin: 50px 0 0 0;
    padding: 0;
}*/

.todomvc-wrapper {
    visibility: visible !important;
}

button {
    margin: 0;
    padding: 10px;
    border: none;
    background: transparent;
    font-size: 14px;
    font-family: inherit;
    font-weight: 500;
    color: #374151;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 40px;
    min-width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

button:hover {
    background: rgba(0, 0, 0, 0.05);
}

button:active {
    transform: scale(0.95);
}

.btn-sm {
    padding: 6px 10px;
    font-size: 12px;
    min-height: 36px;
    min-width: 36px;
}

.btn-outline-success {
    color: #10b981;
    border: 2px solid #10b981;
    background: white;
}

.btn-outline-success:hover {
    background: #10b981;
    color: white;
}

.btn-outline-warning {
    color: #f59e0b;
    border: 2px solid #f59e0b;
    background: white;
}

.btn-outline-warning:hover {
    background: #f59e0b;
    color: white;
}

.btn-outline-danger {
    color: #ef4444;
    border: 2px solid #ef4444;
    background: white;
}

.btn-outline-danger:hover {
    background: #ef4444;
    color: white;
}

.btn-outline-link {
    color: #667eea;
    border: 2px solid #667eea;
    background: white;
    border-radius: 12px;
}

.btn-outline-link:hover {
    background: #667eea;
    color: white;
}

body {
    font: 11px 'Helvetica Neue', Helvetica, Arial, sans-serif;
    line-height: 1.3em;
    background: #f5f5f5;
    color: #4d4d4d;
    min-width: 230px;
    margin: 0 auto;
    -webkit-font-smoothing: antialiased;
    -moz-font-smoothing: antialiased;
    font-weight: 300;
}

button,
input[type="checkbox"] {
    outline: none;
}

.hidden {
    display: none;
}




.app-header .btn-logout {
    float: right;
    margin: 0px 10 0px;
}

.new-todo,
.edit {
    position: relative;
    margin: 0;
    font-size: 14px; /* Prevents zoom on iOS */
    font-family: inherit;
    font-weight: 500;
    line-height: 1.4;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    outline: none;
    color: #1f2937;
    padding: 12px 14px;
    background: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
    min-height: 44px; /* Minimum touch target */
}

.new-todo:focus,
.edit:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.new-todo {
    width: 100%;
    background: rgba(255, 255, 255, 0.9);
}

.card {
    margin: 12px 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    padding: 16px;
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.card h2 {
    color: #1f2937;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 12px;
    text-align: center;
}

.card h6 {
    color: #6b7280;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    margin: 16px 0;
}


/* Add some padding inside the card container */
.card-maincontainer {
    padding: 12px;
    max-width: 100%;
    margin: 0 auto;
}

.card-container {
    padding: 8px;
}

.card-last {
    margin-bottom: 80px; /* Extra space for mobile navigation */
}

/* Improved mobile viewport and touch */
.content {
    padding-top: 1rem;
    padding-bottom: 2rem;
}

/* Better mobile form layout */
.row {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.row .col {
    flex: 1;
}

.row .col-2 {
    flex: 0 0 auto;
}

/* Loading component styling */
.loading-component {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
    color: #6b7280;
}

/* iOS safe area support */
@supports (padding: max(0px)) {
    .card-maincontainer {
        padding-left: max(16px, env(safe-area-inset-left));
        padding-right: max(16px, env(safe-area-inset-right));
    }
}

/* Syncfusion dropdown improvements */
.e-dropdownlist .e-input-group {
    border-radius: 12px !important;
    border: 2px solid #e5e7eb !important;
    min-height: 44px !important;
    background: white !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
    transition: all 0.2s ease !important;
}

.e-dropdownlist .e-input-group:focus-within,
.e-dropdownlist .e-input-group.e-input-focus {
    border-color: #667eea !important;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1) !important;
    background: rgba(102, 126, 234, 0.02) !important;
}

.e-dropdownlist.e-success .e-input-group {
    border-color: #10b981 !important;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1) !important;
    background: rgba(16, 185, 129, 0.02) !important;
}

.e-dropdownlist .e-input {
    font-size: 14px !important;
    font-weight: 500 !important;
    color: #1f2937 !important;
    padding: 10px 14px !important;
    line-height: 1.4 !important;
}

.e-dropdownlist .e-input::placeholder {
    color: #9ca3af !important;
    font-weight: 400 !important;
}

.e-autocomplete .e-input-group {
    border-radius: 12px !important;
    border: 2px solid #e5e7eb !important;
    min-height: 44px !important;
    background: white !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
    transition: all 0.2s ease !important;
}

.e-autocomplete .e-input-group:focus-within,
.e-autocomplete .e-input-group.e-input-focus {
    border-color: #667eea !important;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1) !important;
}

.e-autocomplete .e-input {
    font-size: 14px !important;
    font-weight: 500 !important;
    color: #1f2937 !important;
    padding: 10px 14px !important;
    line-height: 1.4 !important;
}

.e-autocomplete .e-input::placeholder {
    color: #9ca3af !important;
    font-weight: 400 !important;
}

/* Mobile dropdown improvements */
@media (max-width: 768px) {
    .e-dropdownlist .e-input-group,
    .e-autocomplete .e-input-group {
        min-height: 48px !important;
    }
    
    .e-dropdownlist .e-input,
    .e-autocomplete .e-input {
        font-size: 14px !important;
        padding: 12px 14px !important;
    }
}

/* Syncfusion popup styling */
.e-popup.e-ddl.e-popup-open,
.e-popup.e-autocomplete.e-popup-open {
    border-radius: 12px !important;
    border: 1px solid #e5e7eb !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15) !important;
    backdrop-filter: blur(10px) !important;
    background: rgba(255, 255, 255, 0.95) !important;
}

/* Larger dropdown items for primary input */
.primary-input .e-dropdownbase .e-list-item {
    font-size: 16px !important;
    padding: 12px 16px !important;
    min-height: 48px !important;
}

/* Compact controls for secondary inputs */
.compact-control {
    margin-bottom: 8px !important;
}

.compact-control .e-input-group {
    min-height: 36px !important;
}

.compact-control .e-input {
    font-size: 12px !important;
    padding: 6px 10px !important;
}

.compact-control .btn-sm {
    padding: 6px 12px !important;
    font-size: 12px !important;
    min-height: 36px !important;
}

/* Large primary input for adding items */
.primary-input .e-input-group {
    min-height: 42px !important;
    border-width: 2px !important;
}

.primary-input .e-input {
    font-size: 16px !important;
    padding: 8px 12px !important;
    font-weight: 500 !important;
    line-height: 1.4 !important;
}

.primary-input .e-input::placeholder {
    font-size: 16px !important;
}

.primary-input .btn-lg {
    min-height: 42px !important;
    width: 42px !important;
    font-size: 18px !important;
}

@media (max-width: 768px) {
    .compact-control .e-input-group {
        min-height: 40px !important;
    }
    
    .compact-control .e-input {
        font-size: 13px !important;
    }
    
    .primary-input .e-input-group {
        min-height: 52px !important;
    }
    
    .primary-input .e-input {
        font-size: 16px !important;
    }
    
    .primary-input .btn-lg {
        min-height: 52px !important;
        width: 52px !important;
    }
}

.e-list-item:hover {
    background: rgba(102, 126, 234, 0.1) !important;
}

.e-list-item.e-item-focus,
.e-list-item.e-active {
    background: rgba(102, 126, 234, 0.15) !important;
    color: #1f2937 !important;
}

/* Button improvements */
.btn {
    font-weight: 600;
    border-radius: 12px;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.btn-outline-info {
    color: #667eea;
    border-color: #667eea;
    background: white;
}

.btn-outline-info:hover {
    background: #667eea;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* Add item button styling */
.btn-add-item {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 3px 10px rgba(16, 185, 129, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-add-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: scale(0);
    transition: transform 0.2s ease;
}

.btn-add-item:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
    color: white;
}

.btn-add-item:hover::before {
    transform: scale(1);
}

.btn-add-item:active {
    transform: translateY(-1px) scale(1.02);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

@media (max-width: 768px) {
    .btn-add-item {
        width: 48px;
        height: 48px;
        font-size: 18px;
    }
}

/* Responsive button text */
@media (max-width: 576px) {
    .btn .d-none.d-sm-inline {
        display: none !important;
    }
}

/* Shopping list title styling */
.shopping-list-title {
    font-size: 20px;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
}

@media (max-width: 768px) {
    .shopping-list-title {
        font-size: 18px;
    }
}

/* Initial loading screen styling */
.initial-loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* Admin dropdown styling */
.admin-dropdown {
    position: relative;
}

.dropdown-trigger {
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
}

.dropdown-arrow {
    margin-left: 8px;
    font-size: 12px;
    transition: transform 0.3s ease;
}

.admin-dropdown:hover .dropdown-arrow {
    transform: rotate(180deg);
}

.admin-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: rgba(30, 32, 46, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.admin-dropdown:hover .admin-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.admin-dropdown-menu .dropdown-item {
    display: block;
    color: rgba(255, 255, 255, 0.9) !important;
    padding: 12px 20px;
    border-radius: 6px;
    margin: 4px 8px;
    transition: all 0.3s ease;
    text-decoration: none;
}

.admin-dropdown-menu .dropdown-item:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
    transform: translateX(4px);
}

.loading-content {
    text-align: center;
    color: white;
    animation: fadeInUp 0.6s ease-out;
}

.app-logo {
    font-size: 64px;
    margin-bottom: 16px;
    animation: bounceIn 1s ease-out;
}

.loading-content h2 {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 24px 0;
    letter-spacing: 1px;
}

.loading-content p {
    font-size: 16px;
    opacity: 0.9;
    margin: 16px 0 0 0;
}

.loading-spinner {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 24px 0;
}

.spinner-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.8);
    animation: pulse 1.4s ease-in-out infinite both;
}

.spinner-dot:nth-child(1) { animation-delay: -0.32s; }
.spinner-dot:nth-child(2) { animation-delay: -0.16s; }
.spinner-dot:nth-child(3) { animation-delay: 0s; }

@keyframes pulse {
    0%, 80%, 100% {
        transform: scale(0);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.artical-card {
    padding: 10px 8px;
}

.card-horizontal-line {
    display: block;
    margin-top: 0.5em;
    margin-bottom: 0.5em;
    margin-left: 1px;
    margin-right: 10px;
    border-style: inset;
    border-width: 1px;
}

.main {
    position: relative;
    z-index: 2;
    
}

label[for='toggle-all'] {
    display: none;
}

.list-no-dots {
    list-style: none
}

.todo-list {
    margin: 0;
    padding: 0;
    list-style: none;
    width: 100%;
}

.todo-list li {
    position: relative;
    font-size: 14px;
    border-bottom: 1px solid rgba(229, 231, 235, 0.8);
    padding: 5px 0;
    display: flex;
    align-items: center;
    min-height: 40px;
}

.todo-list li:last-child {
    border-bottom: none;
}

.todo-list li.editing {
    border-bottom: none;
    padding: 5px 0;
}

.todo-list li.editing .edit {
    display: block;
    padding: 8px 12px;
    border-radius: 8px;
}

.todo-list li.editing .view {
    display: none;
}

.todo-list li a {
    flex: 1;
    white-space: pre-line;
    word-break: break-word;
    padding: 5px 8px;
    display: block;
    line-height: 1.2;
    transition: color 0.2s ease;
    color: #1f2937;
    font-weight: 600;
    font-size: 16px;
    text-decoration: none;
    min-height: 36px;
    display: flex;
    align-items: center;
}

.todo-list li a:hover {
    color: #667eea;
    background: rgba(102, 126, 234, 0.05);
    border-radius: 8px;
}

.todo-list li.completed a {
    color: #9ca3af;
    text-decoration: line-through;
}

.todo-list li input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-right: 16px;
    border-radius: 4px;
    cursor: pointer;
}

.badge {
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 12px;
    font-weight: 600;
}

.badge-success {
    background: #dcfce7;
    color: #166534;
}

.text-success {
    color: #10b981 !important;
}

.text-muted {
    color: #6b7280;
    font-size: 14px;
    margin-bottom: 16px;
    text-align: center;
}

        .todo-list li .vareInputEdit {
            /*margin: 10px 10px;
            padding: 5px;*/
            width: 100%;
            width: -moz-available; /* WebKit-based browsers will ignore this. */
            width: -webkit-fill-available; /* Mozilla-based browsers will ignore this. */
            width: fill-available;
        }

        .todo-list li checkInput {
            align-content: flex-start;
        }

        .todo-list li .commandBtns {
            float: right;
            align-items: flex-start;
            top: 0;
            bottom: 0;
            margin: 2px;
            height: 30px;
            padding: 2px;
            width: 30px;
        }

.todo-list li .edit {
    display: none;
}

.todo-list li.editing:last-child {
    margin-bottom: -1px;
}

.footer {
    color: white;
    padding: 10px 15px;
    text-align: center;
    border-top: 1px solid #e6e6e6;
    display: block
}

    .footer:before {
        content: '';
        height: 50px;
    }

.todo-count {
    float: left;
    text-align: left;
    line-height:20px;
}

    .todo-count strong {
        font-weight: 300;
    }

.filters {
    margin: 3px;
    padding: 0;
    padding-left: 50px;
    list-style: none;
}

    .filters li {
        display: inline;
    }

        .filters li a {
            color: inherit;
            margin: 5px;
            padding: 3px 7px;
            text-decoration: none;
            border: 1px solid transparent;
            border-radius: 3px;
        }

            .filters li a.selected,
            .filters li a:hover {
                border-color: rgba(175, 47, 47, 0.1);
            }

            .filters li a.selected {
                border-color: rgba(175, 47, 47, 0.2);
            }

.clear-completed,
html .clear-completed:active {
    float: right;
    position: relative;
    line-height: 20px;
    text-decoration: none;
    cursor: pointer;
    position: relative;
}

    .clear-completed:hover {
        text-decoration: underline;
    }

.info {
    margin: 65px auto 0;
    color: #bfbfbf;
    font-size: 10px;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
    text-align: center;
}

    .info p {
        line-height: 1;
    }

    .info a {
        color: inherit;
        text-decoration: none;
        font-weight: 400;
    }

        .info a:hover {
            text-decoration: underline;
        }




@-webkit-keyframes scaleDown {
    0%, 80%, 100% {
        -webkit-transform: scale(0);
        transform: scale(0);
    }

    40% {
        -webkit-transform: scale(1);
        transform: scale(1);
    }
}

@keyframes scaleDown {
    0%, 80%, 100% {
        -webkit-transform: scale(0);
        transform: scale(0);
    }

    40% {
        -webkit-transform: scale(1);
        transform: scale(1);
    }
}

@media screen and (-webkit-min-device-pixel-ratio:0) {
    .toggle-all,
    .todo-list li .toggle {
        background: none;
    }

    .todo-list li .toggle {
        height: 40px;
    }

    .toggle-all {
        -webkit-transform: rotate(90deg);
        transform: rotate(90deg);
        -webkit-appearance: none;
        appearance: none;
    }
}

@media (max-width: 430px) {
    .footer {
        height: 50px;
    }

    .filters {
        bottom: 20px;
    }
}

/* Collapsible section animations */
.collapse-section {
    overflow: hidden;
    transition: max-height 0.3s ease-out, opacity 0.3s ease-out;
}

.collapse-section.collapsed {
    max-height: 0 !important;
    opacity: 0;
}

/* Toggle button styling */
.btn-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.btn-toggle:hover {
    transform: scale(1.1);
}

.btn-toggle i {
    transition: transform 0.3s ease;
}
