/**
 * Booking Calendar Styles
 * Appointment booking system for suchyconsulting.de
 */

/* ============================================================================
   HEADER & BREADCRUMB
   ============================================================================ */

.booking-header {
    background: linear-gradient(135deg, #1e40af 0%, #3730a3 100%);
    color: white;
    padding: 3rem 0 2rem;
    text-align: center;
}

.booking-header .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.breadcrumb {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
}

.breadcrumb a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb a:hover {
    color: white;
    text-decoration: underline;
}

.breadcrumb .separator {
    color: rgba(255, 255, 255, 0.6);
}

.breadcrumb .current {
    color: white;
    font-weight: 600;
}

.booking-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.booking-header .subtitle {
    font-size: 1.125rem;
    opacity: 0.95;
    margin: 0;
}

/* ============================================================================
   MAIN CONTAINER
   ============================================================================ */

.booking-main {
    padding: 3rem 0;
    background: #f9fafb;
    min-height: 60vh;
}

.booking-main .container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* ============================================================================
   STEP INDICATOR
   ============================================================================ */

.step-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 3rem;
    padding: 0 1rem;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    position: relative;
}

.step-number {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #e5e7eb;
    color: #6b7280;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.25rem;
    transition: all 0.3s;
}

.step.active .step-number {
    background: #1e40af;
    color: white;
    transform: scale(1.1);
}

.step.completed .step-number {
    background: #10b981;
    color: white;
}

.step.completed .step-number::after {
    content: '✓';
}

.step-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #6b7280;
    text-align: center;
}

.step.active .step-label {
    color: #1e40af;
}

.step.completed .step-label {
    color: #10b981;
}

.step-line {
    width: 80px;
    height: 2px;
    background: #e5e7eb;
    margin: 0 0.5rem;
}

/* ============================================================================
   BOOKING WIZARD
   ============================================================================ */

.booking-wizard {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    padding: 2.5rem;
    position: relative;
}

.wizard-step {
    display: none;
}

.wizard-step.active {
    display: block;
    animation: fadeIn 0.3s ease-in;
}

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

/* ============================================================================
   CALENDAR
   ============================================================================ */

.calendar-container {
    max-width: 700px;
    margin: 0 auto;
}

.calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    padding: 0 1rem;
}

.calendar-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
    margin: 0;
}

.calendar-nav {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 8px;
    background: #f3f4f6;
    color: #374151;
    font-size: 1.5rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.calendar-nav:hover {
    background: #1e40af;
    color: white;
}

.calendar-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    padding: 0 0.5rem;
}

.weekday {
    text-align: center;
    font-size: 0.875rem;
    font-weight: 600;
    color: #6b7280;
    padding: 0.5rem;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.5rem;
    padding: 0.5rem;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: default;
    transition: all 0.2s;
    position: relative;
}

.calendar-day.empty {
    visibility: hidden;
}

.calendar-day.past {
    color: #d1d5db;
}

.calendar-day.unavailable {
    color: #9ca3af;
    background: #f9fafb;
}

.calendar-day.available {
    background: #d1fae5;
    color: #065f46;
    cursor: pointer;
    font-weight: 600;
}

.calendar-day.available:hover {
    background: #10b981;
    color: white;
    transform: scale(1.05);
}

.calendar-day.today {
    border: 2px solid #fbbf24;
}

.calendar-day.today.available {
    border-color: #10b981;
}

.calendar-legend {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #6b7280;
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 4px;
}

.legend-color.available {
    background: #d1fae5;
}

.legend-color.today {
    border: 2px solid #fbbf24;
    background: white;
}

.legend-color.unavailable {
    background: #f9fafb;
}

/* ============================================================================
   TIME SELECTION
   ============================================================================ */

.time-selection-container {
    max-width: 700px;
    margin: 0 auto;
}

.selected-date-display {
    text-align: center;
    padding: 1rem;
    background: #f3f4f6;
    border-radius: 8px;
    margin-bottom: 2rem;
    font-size: 1.125rem;
}

.selected-date-display strong {
    color: #374151;
    margin-right: 0.5rem;
}

.time-selection-container h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 1.5rem;
    text-align: center;
}

.time-slots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.time-slot {
    padding: 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    background: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.time-slot.available {
    border-color: #10b981;
    color: #065f46;
}

.time-slot.available:hover {
    background: #10b981;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.time-slot.unavailable {
    background: #f9fafb;
    color: #9ca3af;
    cursor: not-allowed;
    opacity: 0.5;
}

.no-slots {
    text-align: center;
    padding: 2rem;
    color: #6b7280;
    font-size: 1.125rem;
}

/* ============================================================================
   BOOKING FORM
   ============================================================================ */

.form-container {
    max-width: 600px;
    margin: 0 auto;
}

.booking-summary {
    background: #f0f9ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.booking-summary h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1e40af;
    margin-bottom: 1rem;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    font-size: 0.9375rem;
}

.summary-label {
    color: #374151;
    font-weight: 600;
}

.summary-value {
    color: #111827;
    font-weight: 500;
}

.booking-form .form-group {
    margin-bottom: 1.5rem;
}

.booking-form label {
    display: block;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
    font-size: 0.9375rem;
}

.booking-form input[type="text"],
.booking-form input[type="email"],
.booking-form input[type="tel"],
.booking-form select,
.booking-form textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.2s;
}

.booking-form input:focus,
.booking-form select:focus,
.booking-form textarea:focus {
    outline: none;
    border-color: #1e40af;
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

.booking-form textarea {
    resize: vertical;
    min-height: 100px;
}

.checkbox-group {
    margin: 1.5rem 0;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    font-weight: 400;
}

.checkbox-label input[type="checkbox"] {
    margin-top: 0.25rem;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.checkbox-label a {
    color: #1e40af;
    text-decoration: underline;
}

.form-note {
    font-size: 0.875rem;
    color: #6b7280;
    margin-top: 1rem;
    text-align: center;
}

/* ============================================================================
   WIZARD NAVIGATION
   ============================================================================ */

.wizard-navigation {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    justify-content: space-between;
}

.wizard-navigation .btn {
    flex: 1;
}

/* ============================================================================
   BUTTONS
   ============================================================================ */

.btn {
    padding: 0.875rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.btn-primary {
    background: #1e40af;
    color: white;
}

.btn-primary:hover {
    background: #1e3a8a;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(30, 64, 175, 0.3);
}

.btn-secondary {
    background: #f3f4f6;
    color: #374151;
}

.btn-secondary:hover {
    background: #e5e7eb;
}

/* ============================================================================
   SUCCESS SCREEN
   ============================================================================ */

.success-container {
    text-align: center;
    padding: 2rem 0;
    max-width: 600px;
    margin: 0 auto;
}

.success-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #10b981;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    margin: 0 auto 1.5rem;
    animation: scaleIn 0.4s ease-out;
}

@keyframes scaleIn {
    from {
        transform: scale(0);
    }
    to {
        transform: scale(1);
    }
}

.success-container h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 1rem;
}

.success-message {
    font-size: 1.125rem;
    color: #6b7280;
    margin-bottom: 2rem;
}

.success-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
}

/* ============================================================================
   LOADING & ERROR
   ============================================================================ */

.loading-spinner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #e5e7eb;
    border-top-color: #1e40af;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-spinner p {
    margin-top: 1rem;
    color: #6b7280;
    font-weight: 600;
}

.error-message {
    position: fixed;
    top: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background: #fee2e2;
    border: 1px solid #fca5a5;
    color: #991b1b;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    max-width: 90%;
}

.error-icon {
    font-size: 1.5rem;
}

.error-text {
    font-weight: 600;
}

/* ============================================================================
   FOOTER
   ============================================================================ */

.booking-footer {
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
    padding: 2rem 0;
    text-align: center;
}

.booking-footer p {
    color: #6b7280;
    margin: 0;
    line-height: 1.8;
}

.booking-footer a {
    color: #1e40af;
    text-decoration: none;
    font-weight: 600;
}

.booking-footer a:hover {
    text-decoration: underline;
}

/* ============================================================================
   RESPONSIVE
   ============================================================================ */

@media (max-width: 768px) {
    .booking-header h1 {
        font-size: 1.875rem;
    }

    .booking-header .subtitle {
        font-size: 1rem;
    }

    .booking-wizard {
        padding: 1.5rem;
    }

    .step-indicator {
        padding: 0;
    }

    .step-label {
        font-size: 0.75rem;
    }

    .step-number {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .step-line {
        width: 40px;
    }

    .calendar-grid {
        gap: 0.25rem;
    }

    .calendar-day {
        font-size: 0.875rem;
    }

    .time-slots-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 0.75rem;
    }

    .time-slot {
        padding: 0.75rem;
        font-size: 0.875rem;
    }

    .wizard-navigation {
        flex-direction: column;
    }

    .success-container h2 {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .booking-header {
        padding: 2rem 0 1.5rem;
    }

    .booking-header h1 {
        font-size: 1.5rem;
    }

    .step-label {
        display: none;
    }

    .calendar-legend {
        flex-direction: column;
        gap: 0.75rem;
    }
}
