﻿body {
    margin: 0;
    font-family: "Instrument Sans", "Helvetica", "Arial", sans-serif;
    font-size: 0.9rem;
    font-weight: 400;
    line-height: 1.5;
    /*color: #212529;*/
    text-align: left;
}

/* Initial Loading Screen */
#app-loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #00a95e;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.3s ease-out;
}

#app-loading-screen.hidden {
    opacity: 0;
    pointer-events: none;
}

/* White spinner styles to match MudProgressCircular */
.loading-spinner {
    width: 60px;
    height: 60px;
    border: 6px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
body {
    margin: 0;
    font-family: "Instrument Sans", "Helvetica", "Arial", sans-serif;
    font-size: 0.75rem;
    font-weight: 400;
    line-height: 1.5;
    /*color: #212529;*/
    text-align: left;
}
.mud-nav-link .mud-nav-link-text {
    font-weight: 600 !important;
}
.mud-nav-link {
    padding-top: 3px;
    padding-bottom: 3px;
    margin-top: 4px;
    margin-bottom: 4px;
}

.overdue-row {
    border-left: 4px solid #d32f2f; /* Material Red 700 */
    background-color: rgba(244, 67, 54, 0.06); /* subtle red tint */
}

.mud-navmenu.mud-navmenu-default .mud-nav-link.active:not(.mud-nav-link-disabled) {
    color: #12332A !important;
    background-color: #8DEB55;
    box-shadow: 0 4px 20px 0px rgba(0, 0, 0, 0.14), 0 7px 10px -5px rgba(22, 109, 118, 0.4);
    /*border-radius: 5px 5px 20px 5px;*/
}
@media (hover: hover) and (pointer: fine) {
    .mud-navmenu.mud-navmenu-default .mud-nav-link.active:not(.mud-nav-link-disabled):hover:not(.mud-nav-link-disabled) {
        background-color: #8DEB55;
    }
}
@media (hover: hover) and (pointer: fine) {
    .mud-nav-link:hover:not(.mud-nav-link-disabled) {
        cursor: pointer;
        text-decoration: none;
        background-color: var(--mud-palette-primary);
        color: #12332A !important;
    }
}
.mud-button-filled.mud-button-filled-primary {
    color: #12332A;
    --mud-ripple-color: var(--mud-palette-primary-text);
    background-color: var(--mud-palette-primary);
}
.mud-fab-primary {
    color: #12332A;
    --mud-ripple-color: var(--mud-palette-primary-text) !important;
    --mud-ripple-opacity: var(--mud-ripple-opacity-secondary) !important;
    background-color: var(--mud-palette-primary);
}
.brain-item:hover {
    color: #85f160;
}

.ai-response {
    font-family: Inter, Roboto, Arial, sans-serif;
    font-size: 0.8rem;
    line-height: 1.3;
}

    .ai-response p {
        margin: 0 0 0.75rem 0;
    }

    .ai-response ul {
        padding-left: 1.25rem;
        margin-bottom: 0.75rem;
    }

    .ai-response li {
        margin-bottom: 0.4rem;
    }

    .ai-response a {
        color: #1976d2;
        text-decoration: underline;
        cursor: pointer;
    }

    .ai-response strong {
        font-weight: 600;
    }

.mud-input:focus-within ~ label.mud-input-label.mud-input-label-inputcontrol {
    color: var(--mud-palette-text-primary);
}

.resetstylesdefault {
    /* Reset all inherited styles */
    all: initial;
    
    /* Set default display and box model */
    display: block;
    box-sizing: border-box;
    
    /* Reset positioning */
    position: static;
    float: none;
    
    /* Reset dimensions */
    width: auto;
    height: auto;
    max-width: 100%;
    
    /* Reset spacing */
    margin: 0;
    padding: 0;
    
    /* Reset text styles */
    font-family: "Instrument Sans", "Helvetica", "Arial", sans-serif;
    font-size: 0.875rem;
    font-weight: 400;
    line-height: 1.5;
    text-align: left;
    
    /* Contain floats */
    overflow: auto;
}

/* Reset styles for all child elements to prevent style leakage */
.resetstylesdefault * {
    box-sizing: border-box;
}

/* Ensure tables within reset don't break page layout */
.resetstylesdefault table {
    max-width: 100%;
    table-layout: auto;
    border-collapse: collapse;
}

/* Ensure images within reset don't break page layout */
.resetstylesdefault img {
    max-width: 100%;
    height: auto;
}

/* Ensure divs with fixed widths don't break responsive layout */
.resetstylesdefault div[style*="width"] {
    max-width: 100% !important;
}

.store-map-wrapper {
    height: calc(100vh - 165px);
    min-height: 480px;
}

.store-list-panel {
    height: calc(100vh - 165px);
    min-height: 480px;
    overflow-y: auto;
}

.store-card {
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s;
    border: 2px solid transparent;
    background-color: #f5f5f5;
    padding: 15px 16px 17px 18px;
    border-radius: 16px 16px 48px 16px !important;
    min-height: 260px;
    box-shadow: none;
}

    .store-card:hover {
        border-color: var(--mud-palette-primary);
    }

    .store-card.selected {
        border-color: var(--mud-palette-primary);
        box-shadow: 0 0 0 2px var(--mud-palette-primary-lighten);
    }

.distance-badge {
    font-size: 0.72rem;
    font-weight: 600;
    white-space: nowrap;
}

.hours-row td {
    padding: 2px 8px 2px 0;
    font-size: 0.82rem;
}

    .hours-row td:first-child {
        font-weight: 600;
        min-width: 96px;
    }

/* Store logo in list cards */
.store-card-logo {
    max-height: 30px;
    max-width: 90px;
    object-fit: contain;
    display: block;
    margin-bottom: 6px;
}

/* Store logo in detail dialog title */
.store-dialog-logo {
    max-height: 44px;
    max-width: 110px;
    object-fit: contain;
    flex-shrink: 0;
}

/* TODAY badge pill */
.today-badge {
    background-color: #4CAF50;
    color: #fff;
    border-radius: 20px;
    padding: 4px 14px;
    font-weight: 700;
    font-size: 0.875rem;
    text-transform: uppercase;
    display: inline-block;
    white-space: nowrap;
    line-height: 1.6;
}

/* Opening hours table in dialog */
.store-hours-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 12px;
}

.store-hours-table td {
    padding: 3px 12px 3px 0;
    font-size: 0.875rem;
    color: #777;
}

.store-hours-table td:first-child {
    min-width: 80px;
}

.store-hours-table tr.today-row td {
    color: #4CAF50;
    font-weight: 700;
}

/* Phone link in dialog */
.store-phone-link {
    color: #4CAF50 !important;
    font-size: 1.0rem;
    font-weight: 500;
    text-decoration: none;
    display: block;
    margin-bottom: 4px;
}

.store-phone-link:hover {
    text-decoration: underline;
}

/* Email / website link in dialog */
.store-email-link {
    color: #4CAF50 !important;
    font-size: 0.875rem;
    text-decoration: none;
    display: block;
    margin-bottom: 4px;
}

.store-email-link:hover {
    text-decoration: underline;
}

/* Responsive show/hide helpers for dialog */
.dialog-desktop-only {
    display: block;
}

@media (max-width: 599px) {
    .dialog-desktop-only {
        display: none;
    }
    .store-card {
        height: 290px;
    }
}

@media (min-width: 768px) {
    .store-address-container {
        min-height: 60px;
    }
}