/* ==========================================================================
   Contact Clinic / Consultation Shortcodes
   Dùng cho [contact-clinic] và [nhakhoahub-contact]
   ========================================================================== */

/* --- Biến màu/đổ bóng dùng cho nút + modal --- */
:root {
    --nkh-primary: #2c3569;        /* Xanh đậm chủ đạo */
    --nkh-primary-dark: #1e274d;   /* Xanh đậm khi hover */
    --nkh-accent: #00c5d7;         /* Cyan tạo điểm nhấn */
    --nkh-white: #ffffff;
    --nkh-bg-light: #f8fafc;       /* Nền input */
    --nkh-border: #e2e8f0;         /* Viền */
    --nkh-muted: #64748b;          /* Chữ phụ */
    --nkh-shadow-bold: 0 12px 30px #0000001a;
    --nkh-shadow-primary: 0 6px 16px #2c35694d;
    --nkh-primary-shadow: #2c356926;
    --nkh-success-bg: #ecfdf5;
    --nkh-success-text: #047857;
    --nkh-error-bg: #fef2f2;
    --nkh-error-text: #b91c1c;
}

/* ==========================================================================
   Nút liên hệ ([contact-clinic])
   ========================================================================== */
.contact-clinic-wrapper {
    margin: 20px 0;
}

.contact-clinic-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.contact-clinic-buttons .button {
    padding: 0 8px;
    margin: 0;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    text-align: center;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    height: 36px;
    line-height: 36px;
    display: inline-block;
}

.contact-clinic-buttons .clinic-detail-btn {
    background-color: var(--nkh-accent);
    color: #fff;
}

.contact-clinic-buttons .clinic-detail-btn:hover {
    background-color: #00a8b8;
    transform: translateY(-2px);
}

.contact-clinic-buttons .clinic-call-btn {
    background-color: #bb0303;
    color: #fff;
}

.contact-clinic-buttons .clinic-call-btn:hover {
    background-color: #a00202;
    transform: translateY(-2px);
}

/* Số điện thoại: ẩn trên mobile, hiện từ tablet (≥481px) để nút gọn hơn.
   Scope dưới .clinic-call-btn để thắng specificity của parent `.button span`. */
.clinic-call-btn .tnk-btn-phone {
    display: none;
}

@media (min-width: 481px) {
    .clinic-call-btn .tnk-btn-phone {
        display: inline-block;
    }
}

@media only screen and (max-width: 48em) {
    .contact-clinic-buttons {
        display: flex;
        flex-wrap: nowrap;
        justify-content: space-between;
        gap: 10px;
    }

    .contact-clinic-buttons .button {
        flex: 1;
        width: auto;
        min-width: 0;
    }
}

/* --- Link chi tiết phòng khám (link chữ nhẹ dưới 2 nút) --- */
.clinic-detail-link {
    display: inline-block;
    margin-top: 10px;
    font-size: 14px;
    font-weight: 500;
    color: var(--nkh-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.clinic-detail-link:hover {
    color: var(--nkh-accent);
    text-decoration: underline;
}

.clinic-detail-link span {
    transition: transform 0.2s ease;
}

.clinic-detail-link:hover span {
    transform: translateX(3px);
    display: inline-block;
}

/* ==========================================================================
   Nút mở modal tư vấn ([nhakhoahub-contact] + biến thể của contact-clinic)
   ========================================================================== */
.consultation-modal-action {
    text-align: center;
    margin: 15px 0;
}

.button.consultation-trigger-btn {
    background-color: var(--nkh-accent) !important;
    color: var(--nkh-white) !important;
    border-radius: 25px !important;
    padding: 0 16px !important;
    height: 36px !important;
    line-height: 36px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    border: none !important;
    display: inline-block !important;
    transition: all .3s ease !important;
}

.button.consultation-trigger-btn:hover {
    background-color: var(--nkh-primary) !important;
    transform: translateY(-2px);
    box-shadow: var(--nkh-shadow-primary);
}

/* ==========================================================================
   Modal đặt lịch / nhận tư vấn (overlay tự viết — không dùng Magnific Popup)
   ========================================================================== */
.nkh-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
    transition: opacity 0.2s ease, visibility 0s;
}

.nkh-modal[aria-hidden="true"] {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
}

.nkh-modal[aria-hidden="false"] {
    visibility: visible;
    opacity: 1;
}

.nkh-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    cursor: pointer;
}

.nkh-modal__box {
    position: relative;
    background: var(--nkh-white);
    border-radius: 16px;
    padding: 30px 25px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--nkh-shadow-bold);
    transform: scale(0.96);
    transition: transform 0.25s ease;
}

.nkh-modal[aria-hidden="false"] .nkh-modal__box {
    transform: scale(1);
}

.nkh-modal__close {
    position: absolute;
    top: 10px;
    right: 14px;
    background: none !important;
    border: none !important;
    padding: 4px 8px !important;
    margin: 0 !important;
    font-size: 26px;
    line-height: 1;
    color: var(--nkh-muted) !important;
    cursor: pointer;
}

.nkh-modal__close:hover {
    color: var(--nkh-primary) !important;
}

/* Khoá cuộn nền khi modal mở */
body.nkh-modal-open {
    overflow: hidden;
}

.supervisor-booking-modal .modal-header {
    margin-bottom: 20px;
}

.supervisor-booking-modal .modal-header p {
    color: #666;
    font-size: 0.95em;
    margin-bottom: 0;
}

.modal-header .modal-title {
    font-size: 1.4em;
    font-weight: 700;
    margin-bottom: 10px;
}

.modal-header .clinic-highlight {
    color: var(--nkh-primary);
}

/* ===== Form trong modal ===== */
.tnk-form .form-row {
    margin-bottom: 15px;
}

.tnk-form input,
.tnk-form select,
.tnk-form textarea {
    width: 100%;
    padding: 12px 15px !important;
    background-color: var(--nkh-bg-light) !important;
    border: 1px solid var(--nkh-border) !important;
    border-radius: 8px !important;
    color: var(--nkh-primary);
    font-size: 15px;
    height: auto !important;
    min-height: 48px;
    line-height: normal !important;
    transition: all 0.3s ease;
    box-shadow: none !important;
}

.tnk-form input:focus,
.tnk-form select:focus,
.tnk-form textarea:focus {
    background-color: var(--nkh-white) !important;
    border-color: var(--nkh-primary) !important;
    box-shadow: 0 0 0 3px var(--nkh-primary-shadow) !important;
    outline: none !important;
}

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

.tnk-form button[type="submit"] {
    width: 100%;
    border-radius: 99px !important;
    padding: 12px 25px !important;
    font-size: 15px;
    font-weight: bold;
    letter-spacing: 0.5px;
    box-shadow: var(--nkh-shadow-primary);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin-top: 5px;
}

.tnk-form button[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px var(--nkh-primary-shadow);
}

.tnk-form button[type="submit"]:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* ===== Thông báo kết quả gửi form ===== */
.booking-message {
    text-align: center;
    padding: 12px;
    border-radius: 8px;
    font-weight: 500;
    margin-bottom: 15px;
    display: none;
}

.booking-message.success {
    display: block !important;
    background-color: var(--nkh-success-bg);
    color: var(--nkh-success-text);
    border: 1px solid var(--nkh-success-text);
    opacity: 0.9;
}

.booking-message.error {
    display: block !important;
    background-color: var(--nkh-error-bg);
    color: var(--nkh-error-text);
    border: 1px solid var(--nkh-error-text);
    opacity: 0.9;
}
