/* CSS สำหรับแบบฟอร์มนัดหมายแพทย์สไตล์โรงพยาบาลกรุงเทพ */
.hosp-appointment-container {
    max-width: 1000px;
    margin: 30px auto;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    padding: 30px;
    font-family: 'Inter', 'Sarabun', sans-serif;
    color: #1e293b;
}

/* ส่วนหัวข้อ */
.hosp-form-header {
    text-align: center;
    margin-bottom: 30px;
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 20px;
}
.hosp-main-title {
    color: #004f9f;
    font-size: 26px;
    font-weight: 700;
    margin: 0 0 8px 0;
}
.hosp-subtitle {
    color: #64748b;
    font-size: 15px;
    margin: 0;
}

/* ส่วนแสดงสถานะแบบ Multi-Step Progress Indicators */
.hosp-step-indicator-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 35px;
    position: relative;
    gap: 10px;
}
.hosp-step-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    z-index: 2;
    cursor: default;
}
.hosp-step-indicator .step-num {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #f1f5f9;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 15px;
    border: 2px solid #e2e8f0;
    transition: all 0.3s ease;
}
.hosp-step-indicator .step-text {
    margin-top: 8px;
    font-size: 13px;
    font-weight: 500;
    color: #64748b;
    text-align: center;
    transition: all 0.3s ease;
}
.hosp-step-indicator.active .step-num {
    background: #004f9f;
    color: #ffffff;
    border-color: #004f9f;
    box-shadow: 0 0 10px rgba(0, 79, 159, 0.2);
}
.hosp-step-indicator.active .step-text {
    color: #004f9f;
    font-weight: 600;
}
.hosp-step-indicator.completed .step-num {
    background: #16a34a;
    color: #ffffff;
    border-color: #16a34a;
}
.hosp-step-indicator.completed .step-text {
    color: #16a34a;
}
.hosp-step-divider {
    height: 3px;
    background: #f1f5f9;
    flex: 1;
    position: relative;
    top: -14px;
    z-index: 1;
}

/* ควบคุมสเต็ปการเปิดปิดฟอร์ม */
.hosp-form-step {
    display: none;
    animation: hospFadeIn 0.4s ease forwards;
}
.hosp-form-step.active {
    display: block;
}
@keyframes hospFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.hosp-step-title {
    font-size: 18px;
    color: #0f172a;
    font-weight: 600;
    margin-top: 0;
    margin-bottom: 20px;
    padding-left: 10px;
    border-left: 4px solid #004f9f;
}

/* สไตล์การ์ดหมวดหมู่บริการ Grid */
.hosp-categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}
.hosp-cat-card {
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 18px;
    cursor: pointer;
    transition: all 0.25s ease;
    background: #ffffff;
}
.hosp-cat-card:hover {
    border-color: #93c5fd;
    background: #fafbfd;
}
.hosp-cat-card.selected {
    border-color: #004f9f;
    background: #eff6ff;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.08);
}
.hosp-cat-icon {
    font-size: 24px;
    margin-bottom: 10px;
}
.hosp-cat-name {
    margin: 0 0 6px 0;
    font-size: 16px;
    color: #004f9f;
    font-weight: 600;
}
.hosp-cat-desc {
    margin: 0;
    font-size: 13px;
    color: #64748b;
    line-height: 1.4;
}

/* ตารางแสดงแพทย์ประจําศูนย์ */
.hosp-doctors-list-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 15px;
}
.hosp-doc-item-card {
    display: flex;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.25s ease;
    background: #ffffff;
    gap: 15px;
}
.hosp-doc-item-card:hover {
    border-color: #94a3b8;
    background: #f8fafc;
}
.hosp-doc-item-card.selected {
    border-color: #004f9f;
    background: #eff6ff;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.08);
}
.hosp-doc-avatar {
    width: 75px;
    height: 75px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #cbd5e1;
}
.hosp-doc-item-card.selected .hosp-doc-avatar {
    border-color: #004f9f;
}
.doc-info-wrap {
    flex: 1;
}
.doc-name {
    margin: 0 0 4px 0;
    font-size: 15px;
    color: #0f172a;
    font-weight: 600;
}
.doc-dept {
    margin: 0 0 6px 0;
    font-size: 12px;
    color: #64748b;
}
.doc-specialty {
    font-size: 11px;
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 4px;
    display: inline-block;
    color: #334155;
    font-weight: 500;
}
.hosp-doc-item-card.selected .doc-specialty {
    background: #dbeafe;
    color: #1e40af;
}

/* ปุ่มเลื่อนหน้าฟอร์ม (Action Buttons) */
.hosp-form-actions {
    display: flex;
    justify-content: space-between;
    border-top: 1px solid #e2e8f0;
    padding-top: 20px;
    margin-top: 25px;
}
.hosp-form-actions.justify-end {
    justify-content: flex-end;
}
.hosp-btn-next, .hosp-btn-prev {
    padding: 10px 24px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}
.hosp-btn-next {
    background: #004f9f;
    color: #ffffff;
    border: 1px solid #004f9f;
}
.hosp-btn-next:hover:not(:disabled) {
    background: #003c7a;
    border-color: #003c7a;
}
.hosp-btn-next:disabled {
    background: #cbd5e1;
    border-color: #cbd5e1;
    color: #94a3b8;
    cursor: not-allowed;
}
.hosp-btn-prev {
    background: #ffffff;
    color: #475569;
    border: 1px solid #cbd5e1;
}
.hosp-btn-prev:hover {
    background: #f8fafc;
    border-color: #94a3b8;
}
.btn-highlight {
    background: #16a34a;
    border-color: #16a34a;
}
.btn-highlight:hover:not(:disabled) {
    background: #15803d;
    border-color: #15803d;
}

/* สไตล์สเต็ปที่ 2: เลือกเวลา & ปฏิทิน */
.hosp-step2-layout-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}
@media (max-width: 768px) {
    .hosp-step2-layout-grid {
        grid-template-columns: 1fr;
    }
}
.hosp-form-control-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
    background: #ffffff;
    transition: all 0.2s ease;
}
.hosp-form-control-input:focus {
    border-color: #004f9f;
    box-shadow: 0 0 0 3px rgba(0, 79, 159, 0.1);
}
.hosp-form-control-input.text-area {
    height: 100px;
    resize: none;
}
.hosp-helper-info {
    font-size: 11px;
    color: #ef4444;
    margin: 5px 0 0 0;
}
.hosp-slots-grid-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    margin-top: 10px;
}
.hosp-slot-time-btn {
    padding: 10px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 13px;
    text-align: center;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.2s ease;
}
.hosp-slot-time-btn:hover:not(.booked) {
    border-color: #004f9f;
    color: #004f9f;
    background: #eff6ff;
}
.hosp-slot-time-btn.selected {
    background: #004f9f;
    color: #ffffff;
    border-color: #004f9f;
}
.hosp-slot-time-btn.booked {
    background: #f1f5f9;
    color: #94a3b8;
    border-color: #e2e8f0;
    cursor: not-allowed;
    text-decoration: line-through;
}

/* สเต็ป 3: ช่องกรอกข้อมูล */
.hosp-fields-row-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}
@media (max-width: 640px) {
    .hosp-fields-row-grid {
        grid-template-columns: 1fr;
    }
}
.hosp-field-label {
    font-weight: 600;
    font-size: 14px;
    color: #334155;
    margin-bottom: 6px;
    display: inline-block;
}
.required {
    color: #ef4444;
}

/* สเต็ป 4: หน้าสรุปผล */
.hosp-summary-panel-box {
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #f8fafc;
    overflow: hidden;
}
.hosp-summary-header-card {
    background: #004f9f;
    padding: 15px 20px;
    color: #ffffff;
}
.hosp-summary-doc-name {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
}
.hosp-summary-doc-dept {
    margin: 3px 0 0 0;
    font-size: 12px;
    opacity: 0.85;
}
.hosp-summary-grid-info {
    padding: 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px 30px;
}
@media (max-width: 640px) {
    .hosp-summary-grid-info {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}
.summary-info-item {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px dashed #e2e8f0;
    padding-bottom: 8px;
}
.info-label {
    font-size: 13px;
    color: #64748b;
}
.info-val {
    font-size: 14px;
    color: #1e293b;
    font-weight: 600;
}
.text-blue {
    color: #004f9f;
}

.hosp-notice-agree-box {
    padding: 15px 20px;
    border-top: 1px solid #cbd5e1;
    background: #ffffff;
    font-size: 13px;
    color: #475569;
}

/* สปินเนอร์และคลาสแจ้งเตือน */
.hosp-spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #004f9f;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    animation: spin 1s linear infinite;
    display: inline-block;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-placeholder, .hosp-neutral-msg {
    grid-column: 1 / -1;
    text-align: center;
    padding: 20px;
    color: #64748b;
    font-size: 13px;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 6px;
}
.hosp-btn-bio:hover {
    background: #004f9f !important;
    color: #ffffff !important;
    border-color: #004f9f !important;
}
