/* Hospital Appointment Booking - Frontend Styles */

#hab-booking-wrapper {
    max-width: 750px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: #333;
}

/* Steps indicator */
.hab-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 35px;
    flex-wrap: wrap;
    gap: 5px;
}
.hab-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    opacity: 0.4;
    transition: opacity 0.3s;
}
.hab-step.active, .hab-step.completed { opacity: 1; }
.hab-step-num {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: #e0e0e0;
    color: #333;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 14px;
    transition: all 0.3s;
}
.hab-step.active .hab-step-num {
    background: #1a6fbf;
    color: #fff;
    box-shadow: 0 2px 12px rgba(26,111,191,0.35);
}
.hab-step.completed .hab-step-num {
    background: #27ae60;
    color: #fff;
}
.hab-step-label { font-size: 12px; font-weight: 600; color: #666; white-space: nowrap; }
.hab-step.active .hab-step-label { color: #1a6fbf; }
.hab-step-line { flex: 1; height: 2px; background: #e0e0e0; min-width: 30px; max-width: 80px; }

/* Step content */
.hab-step-content h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
    color: #1a1a2e;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 12px;
}

/* Fields */
.hab-field { margin-bottom: 18px; }
.hab-field label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 14px; color: #444; }
.hab-field input,
.hab-field select,
.hab-field textarea {
    width: 100%; padding: 11px 14px;
    border: 1.5px solid #ddd; border-radius: 8px;
    font-size: 15px; color: #333;
    transition: border-color 0.2s;
    box-sizing: border-box;
    background: #fff;
}
.hab-field input:focus,
.hab-field select:focus,
.hab-field textarea:focus {
    outline: none;
    border-color: #1a6fbf;
    box-shadow: 0 0 0 3px rgba(26,111,191,0.1);
}
.hab-field .req { color: #e74c3c; }

/* Time slots grid */
#hab-slots-wrapper { margin-bottom: 20px; }
#hab-slots-wrapper label { display: block; font-weight: 600; margin-bottom: 10px; font-size: 14px; color: #444; }
#hab-slots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(95px, 1fr));
    gap: 8px;
}
.hab-slot {
    padding: 10px 6px;
    border: 1.5px solid #1a6fbf;
    border-radius: 8px;
    background: #fff;
    color: #1a6fbf;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}
.hab-slot:hover { background: #1a6fbf; color: #fff; }
.hab-slot.selected { background: #1a6fbf; color: #fff; box-shadow: 0 2px 8px rgba(26,111,191,0.4); }
.hab-slot.hab-slot-booked {
    border-color: #ddd; color: #bbb;
    text-decoration: line-through;
    cursor: not-allowed;
    background: #f9f9f9;
}

/* Buttons */
.hab-actions { display: flex; gap: 12px; margin-top: 24px; flex-wrap: wrap; }
.hab-btn {
    padding: 12px 28px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}
.hab-btn-primary { background: #1a6fbf; color: #fff; }
.hab-btn-primary:hover { background: #155fa0; transform: translateY(-1px); }
.hab-btn-primary:disabled { background: #b0c8e8; cursor: not-allowed; transform: none; }
.hab-btn-secondary { background: #f0f0f0; color: #333; }
.hab-btn-secondary:hover { background: #e0e0e0; }
.hab-btn-success { background: #27ae60; color: #fff; }
.hab-btn-success:hover { background: #219a52; transform: translateY(-1px); }

/* Summary box */
.hab-summary-box {
    background: #f0f6ff;
    border: 1px solid #c5dcf5;
    border-radius: 10px;
    padding: 14px 18px;
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 1.8;
}
.hab-summary-box p { margin: 0; }

/* Payment methods */
.hab-payment-option {
    border: 1.5px solid #e0e0e0;
    border-radius: 10px;
    padding: 14px 18px;
    margin-bottom: 12px;
    transition: border-color 0.2s;
    cursor: pointer;
}
.hab-payment-option:has(input:checked) { border-color: #1a6fbf; background: #f0f6ff; }
.hab-payment-option label { display: flex; align-items: center; gap: 10px; font-weight: 600; cursor: pointer; font-size: 15px; }
.hab-payment-option input[type="radio"] { width: 18px; height: 18px; cursor: pointer; }
.hab-payment-desc { margin: 6px 0 0 28px; font-size: 13px; color: #777; }

/* Amount box */
.hab-amount-box {
    background: #fff8e1;
    border: 1px solid #ffe082;
    border-radius: 8px;
    padding: 12px 18px;
    font-size: 15px;
    margin-top: 16px;
    color: #555;
}

/* Confirmation */
.hab-confirmation { text-align: center; padding: 30px 20px; }
.hab-confirmation-icon {
    width: 70px; height: 70px;
    background: #27ae60;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 32px;
    margin: 0 auto 20px;
    box-shadow: 0 4px 20px rgba(39,174,96,0.4);
}
.hab-confirmation h3 { font-size: 24px; color: #1a1a2e; margin-bottom: 20px; }
.hab-confirmation-card {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px 24px;
    text-align: left;
    margin: 0 auto 20px;
    max-width: 400px;
    font-size: 15px;
    line-height: 2;
}
.hab-ref {
    background: #1a6fbf;
    color: #fff;
    padding: 2px 10px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 14px;
}
.hab-confirmation-note { color: #777; font-size: 13px; margin-bottom: 24px; }

/* Error / Alert */
.hab-alert {
    padding: 12px 18px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 16px;
}
.hab-alert-error { background: #fde8e8; border: 1px solid #f5c6c6; color: #c0392b; }

/* Spinner */
.hab-spinner {
    width: 36px; height: 36px;
    border: 4px solid #e0e0e0;
    border-top-color: #1a6fbf;
    border-radius: 50%;
    animation: hab-spin 0.8s linear infinite;
    margin: 0 auto 12px;
}
@keyframes hab-spin { to { transform: rotate(360deg); } }

/* Responsive */
@media (max-width: 600px) {
    .hab-step-label { display: none; }
    #hab-slots-grid { grid-template-columns: repeat(3, 1fr); }
    .hab-actions { flex-direction: column; }
    .hab-btn { width: 100%; text-align: center; }
}
