/**
 * Modern Premium Styling for Appointment Booking
 */

:root {
    --ab-primary: #6366f1;
    --ab-primary-hover: #4f46e5;
    --ab-secondary: #64748b;
    --ab-success: #10b981;
    --ab-error: #ef4444;
    --ab-text-main: #1e293b;
    --ab-text-muted: #64748b;
    --ab-bg-main: #ffffff;
    --ab-bg-soft: #f8fafc;
    --ab-border: #e2e8f0;
    --ab-ring: rgba(99, 102, 241, 0.2);
    --ab-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --ab-radius: 12px;
}

.doctor-booking-container {
    max-width: 850px;
    margin: 40px auto;
    padding: 40px;
    background: var(--ab-bg-main);
    border-radius: var(--ab-radius);
    box-shadow: var(--ab-shadow);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: var(--ab-text-main);
    line-height: 1.5;
}

.booking-header {
    text-align: center;
    margin-bottom: 40px;
}

.booking-header h2 {
    font-size: 32px;
    font-weight: 800;
    color: var(--ab-text-main);
    margin-bottom: 12px;
    letter-spacing: -0.025em;
}

.booking-header p {
    color: var(--ab-text-muted);
    font-size: 16px;
}

/* Stepper */
.booking-steps-indicator {
    display: flex;
    justify-content: space-between;
    margin-bottom: 48px;
    position: relative;
    padding: 0 20px;
}

.booking-steps-indicator::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 40px;
    right: 40px;
    height: 2px;
    background: var(--ab-border);
    z-index: 1;
}

.step-indicator {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--ab-text-muted);
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.step-indicator::before {
    content: attr(data-step);
    width: 40px;
    height: 40px;
    background: var(--ab-bg-main);
    border: 2px solid var(--ab-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.3s ease;
}

.step-indicator.active {
    color: var(--ab-primary);
}

.step-indicator.active::before {
    border-color: var(--ab-primary);
    background: var(--ab-primary);
    color: white;
    box-shadow: 0 0 0 4px var(--ab-ring);
}

/* Steps */
.booking-step {
    display: none;
    animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.booking-step.active {
    display: block;
}

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

.step-section h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Date Selection */
.date-selection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.date-option {
    padding: 16px;
    border: 2px solid var(--ab-border);
    border-radius: var(--ab-radius);
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--ab-bg-soft);
}

.date-option:hover {
    border-color: var(--ab-primary);
    background: white;
    transform: translateY(-2px);
}

.date-option.selected {
    border-color: var(--ab-primary);
    background: var(--ab-primary);
    color: white;
    box-shadow: 0 4px 12px var(--ab-ring);
}

.date-option .day-name { font-size: 12px; font-weight: 600; text-transform: uppercase; opacity: 0.8; }
.date-option .day-number { font-size: 24px; font-weight: 800; display: block; margin: 4px 0; }
.date-option .month-name { font-size: 13px; font-weight: 500; }

/* Time Slots */
.time-slots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
}

.time-slot {
    padding: 14px;
    border: 1.5px solid var(--ab-border);
    border-radius: 10px;
    text-align: center;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.time-slot:hover:not(.disabled) {
    border-color: var(--ab-primary);
    color: var(--ab-primary);
}

.time-slot.selected {
    background: var(--ab-primary);
    color: white;
    border-color: var(--ab-primary);
}

.time-slot.disabled {
    background: #f1f5f9;
    color: #cbd5e1;
    cursor: not-allowed;
    text-decoration: line-through;
    border-style: dashed;
}

/* Forms */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 14px;
    font-weight: 600;
    color: var(--ab-text-main);
}

.form-group input, .form-group select {
    padding: 12px 16px;
    border: 1.5px solid var(--ab-border);
    border-radius: 10px;
    font-size: 15px;
    transition: all 0.2s ease;
    background: var(--ab-bg-soft);
}

.form-group input:focus, .form-group select:focus {
    outline: none;
    border-color: var(--ab-primary);
    background: white;
    box-shadow: 0 0 0 4px var(--ab-ring);
}

.form-group.full-width { grid-column: 1 / -1; }

/* Summary Card */
.booking-summary-card {
    background: var(--ab-bg-soft);
    padding: 24px;
    border-radius: var(--ab-radius);
    border: 1px solid var(--ab-border);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--ab-border);
}

.summary-row:last-child { border-bottom: none; }
.summary-row span { color: var(--ab-text-muted); font-weight: 500; }
.summary-row strong { color: var(--ab-text-main); font-weight: 700; }

/* Buttons */
.step-actions {
    display: flex;
    justify-content: flex-end;
    gap: 16px;
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid var(--ab-border);
}

.btn {
    padding: 14px 28px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.btn-primary { background: var(--ab-primary); color: white; }
.btn-primary:hover { background: var(--ab-primary-hover); transform: translateY(-1px); }
.btn-primary:disabled { background: var(--ab-border); cursor: not-allowed; transform: none; }

.btn-secondary { background: var(--ab-bg-soft); color: var(--ab-text-main); border: 1px solid var(--ab-border); }
.btn-secondary:hover { background: #f1f5f9; }

.btn-success { background: var(--ab-success); color: white; width: 100%; font-size: 18px; }
.btn-success:hover { filter: brightness(1.1); }

/* Messages */
.booking-message {
    text-align: center;
    padding: 60px 20px;
}

.booking-message .icon {
    width: 80px;
    height: 80px;
    background: #ecfdf5;
    color: var(--ab-success);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    margin: 0 auto 24px;
}

.booking-message.error .icon {
    background: #fef2f2;
    color: var(--ab-error);
}

/* Responsive */
@media (max-width: 640px) {
    .doctor-booking-container { padding: 24px; margin: 20px; }
    .form-grid { grid-template-columns: 1fr; }
    .date-selection-grid { grid-template-columns: repeat(3, 1fr); }
    .booking-steps-indicator::before { display: none; }
    .step-indicator span { display: none; }
}
