/* —— Ticket terms (shared content + modal) —— */
.ticket-terms {
    font-family: 'UTM Avo';
    color: #3a3a3a;
}

.ticket-terms__page-title {
    font-family: 'SVN-Bon Voyage';
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    font-weight: lighter;
    color: #8b5e3c;
    text-align: center;
    margin: 0 0 1rem;
    letter-spacing: 0.04em;
}

.ticket-terms__lead {
    margin: 0 0 1.25rem;
    padding: 0.85rem 1rem;
    background: linear-gradient(90deg, #faf6f2 0%, #fff 100%);
    border-left: 4px solid #8b5e3c;
    border-radius: 0 8px 8px 0;
    font-size: clamp(0.98rem, 2.2vw, 1.08rem);
    line-height: 1.6;
    color: #4a4a4a;
}

.ticket-terms--modal .ticket-terms__lead {
    margin-bottom: 1rem;
    font-size: 0.98rem;
}

.ticket-terms__sections {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.ticket-terms__card {
    background: #fff;
    border: 1px solid #ece4d8;
    border-radius: 10px;
    padding: 0.85rem 1rem;
    box-shadow: 0 2px 8px rgba(139, 94, 60, 0.06);
}

.ticket-terms--page .ticket-terms__card {
    padding: 1rem 1.15rem;
}

.ticket-terms__card-title {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin: 0 0 0.45rem;
    font-size: clamp(1rem, 2.2vw, 1.1rem);
    font-weight: 700;
    color: #8b5e3c;
    line-height: 1.35;
    letter-spacing: 0.02em;
}

.ticket-terms__card-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 1.65rem;
    height: 1.65rem;
    border-radius: 50%;
    background: linear-gradient(145deg, #a67c52, #8b5e3c);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 700;
}

.ticket-terms__card-text {
    margin: 0;
    font-size: clamp(0.92rem, 2vw, 1rem);
    line-height: 1.65;
    color: #444;
}

.ticket-terms__footnote {
    margin: 1rem 0 0;
    padding-top: 0.85rem;
    border-top: 1px dashed #ddd;
    font-size: 0.9rem;
    font-style: italic;
    color: #777;
    line-height: 1.5;
}

/* Policy full page wrapper */
.policy-page {
    max-width: 720px;
    margin: 0 auto;
    padding: 2rem 1rem 3rem;
}

/* —— Modal —— */
body.ticket-terms-modal-open {
    overflow: hidden;
}

.ticket-terms-modal[hidden] {
    display: none !important;
}

.ticket-terms-modal {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.ticket-terms-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(45, 35, 28, 0.55);
    backdrop-filter: blur(3px);
}

.ticket-terms-modal__dialog {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    width: min(100%, 560px);
    max-height: min(88vh, 720px);
    background: linear-gradient(180deg, #fffdfb 0%, #faf7f3 100%);
    border: 2px solid #e8ddd0;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(80, 55, 35, 0.25);
    overflow: hidden;
}

.ticket-terms-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.15rem;
    background: linear-gradient(135deg, #fdf8f2 0%, #f3e6d6 55%, #ebdcc8 100%);
    border-bottom: 1px solid #e5d4c0;
    color: #6b4a2e;
}

.ticket-terms-modal__title {
    margin: 0;
    font-family: 'UTM Avo';
    font-size: clamp(1.05rem, 2.5vw, 1.2rem);
    font-weight: 700;
    letter-spacing: 0.03em;
    line-height: 1.35;
    color: #8b5e3c;
}

.ticket-terms-modal__close {
    flex-shrink: 0;
    width: 2.25rem;
    height: 2.25rem;
    border: 1px solid rgba(139, 94, 60, 0.2);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.75);
    color: #8b5e3c;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.ticket-terms-modal__close:hover {
    background: #fff;
    border-color: rgba(139, 94, 60, 0.35);
    color: #6b4423;
}

.ticket-terms-modal__body {
    flex: 1;
    overflow-y: auto;
    padding: 1.1rem 1.15rem 0.5rem;
}

.ticket-terms-modal__footer {
    padding: 0.85rem 1.15rem 1.1rem;
    border-top: 1px solid #ece4d8;
    background: #fff;
}

.ticket-terms-modal__btn {
    width: 100%;
    padding: 0.8rem 1rem;
    border: none;
    border-radius: 10px;
    background: #a67c52;
    color: #fff;
    font-family: 'UTM Avo';
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease, box-shadow 0.2s ease;
}

.ticket-terms-modal__btn:hover {
    background: #8b5e3c;
    box-shadow: 0 4px 12px rgba(139, 94, 60, 0.25);
}

/* Link mở popup — ghi đè Milligram (button:hover nền xám) */
button.mvc-terms-open-link,
.mvc-terms-open-link {
    display: inline;
    margin: 0;
    padding: 0.1em 0.35em;
    border: none !important;
    border-radius: 4px;
    background: transparent !important;
    color: #8b5e3c !important;
    font: inherit;
    font-weight: 700;
    font-size: inherit;
    height: auto !important;
    line-height: inherit !important;
    letter-spacing: normal !important;
    text-transform: none !important;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
    white-space: normal;
    vertical-align: baseline;
    transition: color 0.2s ease, background 0.2s ease;
}

button.mvc-terms-open-link:hover,
button.mvc-terms-open-link:focus-visible,
.mvc-terms-open-link:hover,
.mvc-terms-open-link:focus-visible {
    background: rgba(166, 124, 82, 0.18) !important;
    color: #6b4423 !important;
    text-decoration: underline;
    outline: none;
    box-shadow: none;
}

.mvc-seat-booking-terms-label .mvc-terms-open-link {
    font-size: inherit;
}

@media (max-width: 576px) {
    .ticket-terms-modal {
        padding: 0.5rem;
        align-items: flex-end;
    }

    .ticket-terms-modal__dialog {
        max-height: 92vh;
        border-radius: 16px 16px 0 0;
    }
}
