.status-bar-safe-area {
    display: none;
}
html, body {
    font-family: 'Inter', sans-serif;
}
:root {
    --mud-appbar-height: 0px !important;
}
ol,
ul {
  padding-left: 2rem;
}

ol,
ul,
dl {
  margin-top: 0;
  margin-bottom: 1rem;
}

ol ol,
ul ul,
ol ul,
ul ol {
  margin-bottom: 0;
}
.main-layout {
    background-color: #fff!important;
}
.mud-toolbar {
background-color: #fff!important;
}
.tc-sub-header {
    color: var(--Color-Theme-mud-palette-primary, #5A2476);

    /* Body/body2-sm */
    font-family: var(--Font-Family-family, Inter);
    font-size: var(--Font-Size-body2, 14px);
    font-style: normal;
    font-weight: 600;
    line-height: var(--Font-Line-Height-lineheight-body2, 20.02px); /* 143% */
    letter-spacing: var(--Font-Spacing-spacing-body2, 0.15px);
    margin-bottom: var(--Font-Size-body2, 15px);
}
/* .mud-badge.mud-badge-top.right.mud-badge-overlap {
    inset: auto auto calc(100% - 22px) calc(100% - 24px);
} */

.notification-badge {
    min-width: 24px !important;
    height: 24px !important;
    font-size: 10px !important;
    font-weight: bold !important;
    background-color: #ff0066 !important;
    color: white !important;
    border: 2px solid white !important;
    inset: auto auto calc(100% - 18px) calc(100% - 22px) !important;
    border-radius: 12px !important;
}
.show-box-container {
    background-color:#fff!important;
    overflow: hidden!important;
    flex: 1!important; 
    min-height: 0!important; 
    display: flex!important; 
    flex-direction: column;
    /* flex-direction: column; border-radius: 16px; box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1) !important; */
}
.inner-scroller {
    flex: 1!important; 
    min-height: 0!important; 
    display: flex!important; 
    flex-direction: column!important;
    overflow-y: auto!important;
    scrollbar-width: none !important; /* Firefox */
    -ms-overflow-style: none !important; /* Internet Explorer 10+ */
}

.inner-scroller::-webkit-scrollbar {
    display: none !important; /* Safari and Chrome */
    width: 0 !important;
    background: transparent !important;
}

.inner-scroller::-webkit-scrollbar-track {
    background: transparent !important;
}

.inner-scroller::-webkit-scrollbar-thumb {
    background: transparent !important;
}
.brand-gradient {
    background-image: linear-gradient(to bottom right, #5a2476, #4156b5);
}
.home-root-container {
    height: 100%;
    display: flex!important;
    flex-direction: column!important;
}
.home-root-container .mud-tabs {
    flex: 1;
    display: flex;
    flex-direction: column;
}
.home-root-container .mud-tabs-tabbar {
    height: 64px;
    flex-shrink: 0;
}
.home-root-container  .mud-tabs-panels {
    flex: 1!important;
    overflow-y: auto!important;
    min-height: 0;
    margin: 0px 30px 10px 30px;
    padding-bottom: 30px;
}
.main-layout {
    flex: 1 1 auto; 
    display: flex; 
    flex-direction: column;
    height: 100vh!important;
}
h1:focus {
    outline: none;
}

a, .btn-link {
    color: #0071c1;
}
.keypad-button {
    border-radius: 50% !important;
    width: 56px !important;
    height: 56px !important;
    min-width: 56px !important;
    min-height: 56px !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
}
.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

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

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    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;
    }

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG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NjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem auto;
}

    .loading-progress circle {
        fill: none;
        stroke: #e0e0e0;
        stroke-width: 0.6rem;
        transform-origin: 50% 50%;
        transform: rotate(-90deg);
    }

        .loading-progress circle:last-child {
            stroke: #1b6ec2;
            stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
            transition: stroke-dasharray 0.05s ease-in-out;
        }

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

    .loading-progress-text:after {
        content: var(--blazor-load-percentage-text, "Loading");
    }

code {
    color: #c02d76;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}
/* Appointments Page Styles */

/* Past Appointments Notice */
.past-notice-container {
    padding: 0px;
    margin-top: 20px;
}

.past-notice-text {
    font-family: Inter;
    font-weight: 500;
    font-size: 15px;
    line-height: 1.5em;
    letter-spacing: 0.9375%;
    color: #272C34;
    text-align: left;
}

/* Search and Sort Controls */
.search-sort-container {
    padding: 0px;
    margin-bottom: 20px;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 16px;
}

.search-field {
    flex: 1;
    box-shadow: 0px 1px 6px 0px rgba(0, 0, 0, 0.15);
}

.search-field .mud-input-root {
    font-family: Inter;
    font-weight: 700;
    font-size: 15px;
    line-height: 1.75em;
    letter-spacing: 0.9375%;
}

.sort-controls {
    display: flex;
    align-items: center;
    gap: 4px;
}

.sort-label {
    font-family: Inter;
    font-weight: 700;
    font-size: 15px;
    line-height: 1.75em;
    letter-spacing: 0.9375%;
    color: #424242;
}

.sort-icon {
    color: #1C1B1F;
}

.sort-icon .mud-icon-root {
    width: 24px;
    height: 24px;
}

.sort-icon img {
    width: 24px;
    height: 24px;
    display: block;
}

.appointments-title {
    font-family: Inter;
    font-weight: 800;
    font-size: 24px;
    line-height: 1.334em;
    text-align: center;
    color: #272C34;
    margin-bottom: 20px;
    margin-top: 20px;
}

.tabs-container {
    display: flex;
    justify-content: center;
    border-top: 1px solid #E0E0E0;
    border-bottom: 1px solid #E0E0E0;
    padding: 0;
    margin-bottom: 0;
}

.appointments-tabs .mud-tabs-tabbar {
    background: transparent;
}

/* Reset all tab borders first */
.appointments-tabs .mud-tab {
    border-bottom: none !important;
}

/* Style for active tab */
.appointments-tabs .mud-tab.mud-tab-active {
    border-bottom: 2px solid #5A2476 !important;
}

.appointments-tabs .mud-tab.mud-tab-active .mud-tab-content {
    line-height: 1.57em;
    letter-spacing: 0.71%;
    color: #5A2476 !important;
}

/* Style for inactive tabs */
.appointments-tabs .mud-tab:not(.mud-tab-active) {
    border-bottom: none !important;
}

.appointments-tabs .mud-tab:not(.mud-tab-active) .mud-tab-content {
    line-height: 1.57em;
    letter-spacing: 0.71%;
    color: rgba(0, 0, 0, 0.38) !important;
}

.filter-container {
    padding: 0px;
    margin-top: 20px;
    margin-bottom: 20px;
}
.patient-select {
    width: 100%;
    background: white;
}

.appointments-list-container {
    padding: 0 0px;
    flex: 1;
    overflow-y: auto;
    padding-bottom: 20px; /* Extra space at bottom to prevent cut-off */
    gap: 12px; /* Consistent spacing between cards */
    /* Hide scrollbar */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* Internet Explorer 10+ */
}

.appointments-list-container::-webkit-scrollbar {
    display: none; /* Safari and Chrome */
}

.appointment-card {
    border: 1px solid #E0E0E0;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    box-shadow: 0px 1px 6px 0px rgba(0, 0, 0, 0.15);
    margin-bottom: 12px; /* Consistent spacing between cards */
    overflow: hidden; /* Ensure clean borders */
}

.appointment-content {
    width: 100%;
}

.date-section {
    width: 78px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 80px; /* Ensure consistent height */
}

.date-section.regular-appointment {
    background: rgba(66, 66, 66, 0.06);
    border-left: 6px solid #71BFC9;
}

.date-section.past-appointment {
    background: rgba(66, 66, 66, 0.06);
    border-left: 6px solid #71BFC9;
}

.date-section.new-appointment {
    background: rgba(0, 200, 83, 0.06);
    border-left: 6px solid #00C853;
}

.date-section.updated-appointment {
    background: rgba(255, 152, 0, 0.06);
    border-left: 6px solid #FFB400;
}

.date-stack {
    padding: 0dvh; /* Reduced from 4px */
    height: 100%;
}

.day-of-week {
    font-family: Inter;
    font-weight: 700;
    font-size: 15px;
    line-height: 1.43em; /* Adjusted for tighter spacing */
    letter-spacing: 0.71%;
    text-align: center;
    color: #50667e;
    margin: 0;
    margin-bottom: 0px; /* Small gap between day and number */
}

/* Past appointment date text styling */
.past-appointment .day-of-week,
.past-appointment .day-number,
.past-appointment .month-year {
    color: rgba(0, 0, 0, 0.54) !important;
}

/* Updated appointment date text styling */
.updated-appointment .day-of-week,
.updated-appointment .day-number,
.updated-appointment .month-year {
    color: #5A2476 !important;
}

.day-number {
    font-family: Inter;
    font-weight: 700;
    font-size: 34px;
    line-height: 1.18em; /* Tighter line height */
    letter-spacing: 0.74%;
    text-align: center;
    color: #50667e;
    margin: 0;
    width: 44px;
    height: 40px; /* Adjusted height */
    display: flex;
    align-items: center;
    justify-content: center;
}

.month-year {
    font-family: Inter;
    font-weight: 500;
    font-size: 15px;
    line-height: 1.43em; /* Adjusted for consistency */
    letter-spacing: 0.71%;
    text-align: center;
    color: #50667e;
    margin: 0;
    margin-top: 2px; /* Small gap between number and month */
}

.appointment-details {
    flex: 1;
    padding: 0; /* Reduced from 2px 0 */
}

.detail-row {
    padding: 5px 8px 5px 8px; /* Reduced from 2px 10px 0px 10px */
    min-height: 20px; /* Reduced from 22px */
}
.detail-row-container {
    border-bottom: 1px #E0E0E0 solid;
}

.detail-row:last-child {
    border-bottom: none; /* Remove border from last item */
}

.detail-content {
    flex: 1;
}

.detail-icon {
    color: #1C1B1F;
    width: 24px;
    height: 24px;
}

.patient-name {
    font-family: Inter;
    font-weight: 700;
    font-size: 14px;
    line-height: 1.43em; /* Tighter line height */
    letter-spacing: 0.15px;
    color: #424242;
    margin: 0; /* Remove any default margin */
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

.department-name, .hospital-name, .appointment-time  {
    font-family: Inter;
    font-weight: 700;
    font-size: 14px;
    line-height: 1.43em; /* Tighter line height */
    letter-spacing: 0.15px;
    color: #424242;
    margin: 0; /* Remove any default margin */
}


.appointment-divider {
    margin: 0 0px; /* Reduced from 0 10px */
    height: 1px;
    background-color: #E0E0E0;
}

.new-chip {
    background-color: #00C853 !important;
    color: white !important;
    font-family: Inter;
    font-weight: 500;
    font-size: 10px;
    line-height: 1.585em;
    letter-spacing: 3.33%;
    height: 20px;
    padding: 0px 6px;
    margin-right: 8px;
}

.updated-chip {
    background-color: #FF9800 !important;
    color: white !important;
    font-family: Inter;
    font-weight: 500;
    font-size: 10px;
    line-height: 1.585em;
    letter-spacing: 3.33%;
    height: 20px;
    padding: 0px 6px;
    margin-right: 8px;
}

/* Hide new chip for past appointments */
.appointment-card.past-appointment .new-chip {
    opacity: 0;
    visibility: hidden;
}

/* Hide updated chip for past appointments */
.appointment-card.past-appointment .updated-chip {
    opacity: 0;
    visibility: hidden;
}

.expand-icon {
    margin-left: auto;
    color: #1C1B1F;
}

.expanded-address {
    font-family: Inter;
    font-weight: 400;
    font-size: 13px;
    color: #666;
    margin-left: 34px;
    padding: 0 8px; /* Reduced from 0 10px */
}

/* Bottom Navigation Styles */
.bottom-nav {
    width: 100%;
    height: 80px;
    border-top: 1px solid #E0E0E0;
    box-shadow: 0px -4px 12px 0px rgba(0, 0, 0, 0.12);
}

.tab-active {
    background: rgba(255, 64, 129, 0.06);
    border-top: 3px solid #ff0066;
}

.tab-inactive {
    opacity: 0.5;
}

.tab-text {
    font-family: Inter;
    font-weight: 800;
    font-size: 10px;
    letter-spacing: 4%;
    text-align: center;
    margin-top: 2px;
}

.tab-text-active {
    color: #50667e;
}

.tab-text-inactive {
    color: #272C34;
}
.mud-input-error .mud-input-control-helper-container {
    background-color: rgba(244, 67, 54, 0.1) !important; /* Dim red background similar to MudAlert Error */
    border-radius: 0px !important;
    padding: 12px 16px 12px 44px !important; /* Extra left padding for the icon */
    margin-top: 8px !important;
    position: relative !important;
    display: flex !important;
    align-items: flex-start !important;
}

/* Exclamation icon using CSS pseudo-element */
.mud-input-error .mud-input-control-helper-container::before {
    content: "!" !important;
    position: absolute !important;
    left: 16px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 20px !important;
    height: 20px !important;
    border: 1px solid #f44336;
    color: #f44336 !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-weight: bold !important;
    font-size: 14px !important;
    line-height: 1 !important;
    font-family: 'Inter', sans-serif !important;
}

/* Style the validation text */
.mud-input-error .mud-input-control-helper-container .mud-input-helper-text {
    color: #d32f2f !important; /* Darker red for better readability */
    font-size: 14px !important;
    font-weight: 500 !important;
    line-height: 1.4 !important;
    margin: 0 !important;
    flex: 1 !important;
}
.icon-active {
    filter: brightness(0) saturate(100%) invert(36%) sepia(12%) saturate(1061%) hue-rotate(164deg) brightness(95%) contrast(88%);
}

.icon-inactive {
    filter: brightness(0) saturate(100%) invert(16%) sepia(7%) saturate(822%) hue-rotate(169deg) brightness(95%) contrast(91%);
}

/* Enhanced Mobile Optimizations */
/* Date Picker Styling */
.mud-picker-calendar-header-switch {
    color: #272C34 !important;
}

.mud-picker-year {
    color: #272C34 !important;
}

.mud-picker-year:hover {
    color: #5A2476 !important;
    background-color: rgba(90, 36, 118, 0.12) !important;
}

.mud-picker-year.mud-picker-year-selected {
    color: #FFFFFF !important;
    background-color: #5A2476 !important;
}

.mud-picker-month {
    color: #272C34 !important;
}

.mud-picker-month:hover {
    color: #5A2476 !important;
    background-color: rgba(90, 36, 118, 0.12) !important;
}

.mud-picker-month.mud-picker-month-selected {
    color: #FFFFFF !important;
    background-color: #5A2476 !important;
}

.mud-picker-calendar-header {
    color: #272C34 !important;
}

.mud-picker-calendar-day {
    color: #272C34 !important;
}

.mud-picker-calendar-day:hover {
    color: #5A2476 !important;
    background-color: rgba(90, 36, 118, 0.12) !important;
}
.mud-picker-calendar-day.mud-selected {
    color: #FFFFFF !important;
    background-color: #5A2476 !important;
}
.mud-picker-calendar-day.mud-picker-calendar-day-selected {
    color: #FFFFFF !important;
    background-color: #5A2476 !important;
}

.mud-picker-calendar-day.mud-picker-calendar-day-today {
    border-color: #5A2476 !important;
}
.mud-picker-datepicker-toolbar .mud-button-label {
    color: #272C34 !important;
}
/* Navigation arrows */
.mud-picker-calendar-header .mud-icon-button {
    color: #272C34 !important;
}

.mud-picker-calendar-header .mud-icon-button:hover {
    color: #5A2476 !important;
    background-color: rgba(90, 36, 118, 0.12) !important;
}

/* Improved scroll performance on mobile */
.inner-scroller, .appointments-list-container {
    -webkit-overflow-scrolling: touch;
}

/* Prevent zoom on input focus (iOS) */
input, select, textarea {
    font-size: 15px !important;
}

/* Better mobile typography */
@media (max-width: 480px) {
    .appointments-title {
        font-size: 20px;
        margin-bottom: 16px;
        margin-top: 16px;
    }
    
    
    
    .day-number {
        font-size: 30px;
    }
}

/* Enhanced safe area support */
@supports (-webkit-touch-callout: none) {
    .status-bar-safe-area {
        display: flex;
        position: sticky;
        top: 0;
        height: env(safe-area-inset-top);
        background-color: #f7f7f7;
        width: 100%;
        z-index: 1;
    }

    .flex-column, .navbar-brand {
        padding-left: env(safe-area-inset-left);
    }
    
    /* Bottom navigation safe area */
    .bottom-nav {
        padding-bottom: env(safe-area-inset-bottom);
    }
    
    /* Main content safe area adjustments */
    .main-layout {
        padding-left: env(safe-area-inset-left);
        padding-right: env(safe-area-inset-right);
    }
}

/* iOS specific fixes */
@supports (-webkit-appearance: none) {
    /* Disable tap highlight */
    * {
        -webkit-tap-highlight-color: transparent;
    }
    
    /* Better button appearance */
    .mud-button {
        -webkit-appearance: none;
        appearance: none;
        border-radius: 8px;
    }
    
    /* Smooth scrolling */
    .inner-scroller {
        -webkit-overflow-scrolling: touch;
    }
}

/* Android specific optimizations */
@media screen and (-webkit-min-device-pixel-ratio: 0) and (min-resolution: .001dpcm) {
    .appointment-card {
        transform: translateZ(0);
        will-change: transform;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .appointment-card {
        border-width: 0.5px;
    }
}

/* Landscape orientation adjustments */
@media (orientation: landscape) and (max-height: 500px) {
    .appointments-title {
        font-size: 18px;
        margin-bottom: 12px;
        margin-top: 12px;
    }
    
    .date-section {
        min-height: 60px;
    }
    
    .day-number {
        font-size: 24px;
        height: 30px;
    }
}
