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

html {
    height: 100%;
}

html, body {
    font-family: 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    display: flex;
    flex-direction: column;
    height: 100vh;
    margin: 0;
}

h1:focus {
    outline: none;
}

a, .btn-link {
    color: #0071c1;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.content {
    padding-top: 1.1rem;
    flex: 1;
}

.footer {
    margin-top: auto;
}

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

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

/* Modern Loading animation */
.loading-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

.loading-text {
    font-size: 1.2rem;
    color: var(--primary-color);
    font-weight: 500;
}

.modern-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-left-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.spinner-border.text-primary {
    border-right-color: var(--primary-color);
    border-bottom-color: var(--primary-light);
    border-left-color: var(--primary-dark);
    border-top-color: rgba(0, 0, 0, 0.1);
}

/* In-page loading spinner */
.spinner-overlay {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* For any code that still uses the .loading-image class */
.loading-image {
    display: none; /* Hide any gif spinners */
}

#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;
    }

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

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

/* Date Selection UI Styles */
.date-selection-container {
    margin-bottom: 1rem;
}

/* Section Styling */
.available-dates-section,
.past-dates-section,
.personal-info-section {
    margin-bottom: 1.5rem;
}

.personal-info-section {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 2rem;
    border: 1px solid #e9ecef;
}

.section-header {
    color: #495057;
    font-weight: 600;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #e9ecef;
}

.section-title {
    color: #495057;
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

.section-title .badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
}



.date-card {
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 0;
    background: #ffffff;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    min-height: 140px;
    display: flex;
    flex-direction: column;
}

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

.date-card.active {
    border-color: #145A32;
    background: #145A32;
}

.date-card.active:hover {
    border-color: #13653F;
    background: #13653F;
    box-shadow: 0 4px 16px rgba(19, 101, 63, 0.25);
}

.date-card.selected {
    border-color: #007bff;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    box-shadow: 0 4px 16px rgba(0, 123, 255, 0.2);
}

.date-card.inactive {
    border-color: #dee2e6;
    background: #f8f9fa;
    opacity: 0.6;
}

.date-card.past {
    border-color: #6c757d;
    background: #e9ecef;
    opacity: 0.5;
}

.date-card-header {
    background: linear-gradient(135deg, #2e7d32 0%, #1b5e20 100%);
    color: white;
    padding: 0.75rem;
    text-align: center;
    position: relative;
}

.date-card.active .date-card-header {
    background: #13653F;
}

.date-card.selected .date-card-header {
    background: linear-gradient(135deg, #1976d2 0%, #1565c0 100%);
}

.date-card.past .date-card-header {
    background: linear-gradient(135deg, #616161 0%, #424242 100%);
}

.date-day {
    font-size: 1.5rem;
    font-weight: bold;
    line-height: 1;
}

.date-month {
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.date-card-body {
    padding: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.date-year {
    font-size: 0.875rem;
    color: #6c757d;
    font-weight: 500;
}

.date-weekday {
    font-size: 0.875rem;
    color: #495057;
    font-weight: 600;
    margin: 0.25rem 0;
}

.date-badge {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.today-badge {
    background: #ffc107;
    color: #212529;
}

.past-badge {
    background: #6c757d;
    color: white;
}

.inactive-badge {
    background: #dc3545;
    color: white;
}

.selected-badge {
    background: #007bff;
    color: white;
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    right: auto;
}

.date-card-footer {
    padding: 0.75rem;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
    text-align: center;
}

.date-card.active .date-card-footer {
    background: #e8f5e8;
    border-top-color: #a5d6a7;
}

.date-card.selected .date-card-footer {
    background: #e3f2fd;
    border-top-color: #bbdefb;
}

.selected-date-info {
    margin-top: 1rem;
}

.selected-date-info .alert {
    border-left: 4px solid #007bff;
    background: linear-gradient(135deg, #e3f2fd 0%, #f3f8ff 100%);
}

/* Responsive Design */
@media (max-width: 768px) {
    .date-card {
        min-height: 120px;
    }
    
    .date-day {
        font-size: 1.25rem;
    }
    
    .date-month {
        font-size: 0.75rem;
    }
    
    .date-badge {
        font-size: 0.625rem;
        padding: 0.2rem 0.4rem;
    }
}

@media (max-width: 576px) {
    .date-selection-container .row {
        margin: 0 -0.5rem;
    }
    
    .date-selection-container .col-md-6 {
        padding: 0 0.5rem;
        margin-bottom: 1rem;
    }
    
    .date-card {
        min-height: 100px;
    }
    
    .date-card-body {
        padding: 0.75rem;
    }
}

/* Animation for selection */
@keyframes selectPulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.date-card.selected {
    animation: selectPulse 0.6s ease-in-out;
}

/* Focus states for accessibility */
.date-card:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

.date-card.active:focus {
    outline-color: #388e3c;
}

/* Disabled state styling */
.date-card.inactive,
.date-card.past {
    cursor: not-allowed !important;
}

.date-card.inactive:hover,
.date-card.past:hover {
    transform: none;
    box-shadow: none;
}

/* Enhanced visual feedback for better UX */
.date-card.active:not(.selected):hover {
    border-color: #2e7d32;
    background: linear-gradient(135deg, #ffffff 0%, #e8f5e8 100%);
}

.date-card.selected:hover {
    border-color: #0056b3;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
}

/* Improved accessibility */
.date-card[tabindex="0"]:focus {
    outline: 3px solid #007bff;
    outline-offset: 2px;
}

.date-card.active[tabindex="0"]:focus {
    outline-color: #28a745;
}

/* Loading state for better user feedback */
.date-selection-container.loading {
    opacity: 0.7;
    pointer-events: none;
}

.date-selection-container.loading::after {
    content: "Loading dates...";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.9);
    padding: 1rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    color: #007bff;
    z-index: 10;
}

/* Enhanced mobile experience */
@media (max-width: 576px) {
    .date-card {
        margin-bottom: 0.75rem;
    }
    
    .date-selection-container .row {
        margin: 0;
    }
    
    .date-selection-container .col-md-6 {
        padding: 0 0.25rem;
    }
    
    .selected-date-info .alert {
        font-size: 0.875rem;
        padding: 0.75rem;
    }
    
    .personal-info-section {
        padding: 1.5rem;
        margin-top: 2rem;
    }
    
    .section-header {
        font-size: 1.1rem;
        margin-bottom: 1rem;
    }
}

/* Print-friendly styles */
@media print {
    .date-selection-container {
        display: none;
    }
    
    .selected-date-info .alert {
        border: 1px solid #007bff;
        background: #f8f9fa !important;
        color: #000 !important;
    }
}

/* Ensure text/icons are readable on dark green */
.date-card.active .date-card-body,
.date-card.active .date-card-footer,
.date-card.active .date-day,
.date-card.active .date-month,
.date-card.active .date-year,
.date-card.active .date-weekday,
.date-card.active .oi {
    color: #ffffff !important;
}