/* ==========================================================================
   Findme — CSS giao diện MỚI
   File này được enqueue tự động (handle 'findme-custom') ở custom/bootstrap.php
   và nạp trên toàn site. Toàn bộ CSS cũ đã được gỡ ngày 2026-06-28.
   Dán / viết style mới của bạn bên dưới.
   ========================================================================== */

/* --- Chuẩn hóa nội dung bài viết/sự kiện (the_content) trong .fx-article --- */
.fx-article img,
.fx-rte img {
    max-width: 100%;
    height: auto;
}

.fx-article figure,
.fx-article .wp-caption,
.fx-article .wp-block-image {
    max-width: 100%;
    margin: 1.5rem auto;
}

.fx-article img.aligncenter,
.fx-article .aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.fx-article img.alignleft,
.fx-article .alignleft {
    float: left;
    margin: 0.5rem 1.5rem 1rem 0;
    max-width: 50%;
}

.fx-article img.alignright,
.fx-article .alignright {
    float: right;
    margin: 0.5rem 0 1rem 1.5rem;
    max-width: 50%;
}

/* Ảnh full/wide từ block editor không vượt quá khung */
.fx-article .alignfull,
.fx-article .alignwide {
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
}

/* Bảng trong bài cuộn ngang khi tràn, không phá layout */
.fx-article .article-table-scroll,
.fx-article figure.wp-block-table {
    width: 100%;
    overflow-x: auto;
}

.fx-article table {
    max-width: 100%;
}

/* iframe/video nhúng trong bài không tràn */
.fx-article iframe,
.fx-rte iframe {
    max-width: 100%;
}

/* Spinner loading (nút Dự tính chi phí, dùng chung) */
.td-spin {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid rgba(255, 255, 255, .4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: td-spin .7s linear infinite;
}

@keyframes td-spin {
    to {
        transform: rotate(360deg);
    }
}

/* ── Flatsome [section] shim ────────────────────────────────────────────────
   Flatsome CSS bị khóa (disable-flatsome-css.php) nên các class do shortcode
   [section] sinh ra không có styling. Bổ sung tối thiểu để layout đúng.
   Áp dụng toàn site — không ảnh hưởng đến pages dùng Tailwind.
   ────────────────────────────────────────────────────────────────────────── */
.section {
    position: relative;
    background-size: cover;
    background-position: 50% 50%;
    background-repeat: no-repeat;
    width: 100%;
}

.section.is-full-height {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.section-bg {
    position: absolute;
    overflow: hidden;
    background-size: cover;
    background-position: 50% 50%;
    background-repeat: no-repeat;
}

.section-bg.fill {
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.section-bg img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.section-content {
    position: relative;
    z-index: 2;
    width: 100%;
    flex: 1;
}

/* ── 404 Page ─────────────────────────────────────────────────────────────── */
.td-404 {
    position: relative;
    min-height: 100svh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #15233f;
    overflow: hidden;
}

.td-404__bg {
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(ellipse 70% 60% at 50% 110%, rgba(194,163,104,.18) 0%, transparent 70%),
        radial-gradient(ellipse 40% 30% at 80% 10%,  rgba(194,163,104,.08) 0%, transparent 60%);
}

.td-404__inner {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 7rem 1.5rem 4rem;
    max-width: 52rem;
}

.td-404__deco {
    display: flex;
    align-items: center;
    gap: .5rem;
    line-height: 1;
    color: #c2a368;
    font-family: var(--font-display, "Beautique Display Condensed", sans-serif);
    font-size: clamp(7rem, 20vw, 14rem);
    letter-spacing: -.02em;
    user-select: none;
    margin-bottom: 1.5rem;
}

.td-404__ring {
    width: clamp(5rem, 14vw, 10rem);
    height: clamp(5rem, 14vw, 10rem);
    color: #c2a36866;
    flex-shrink: 0;
}

.td-404__label {
    font-family: var(--font-gilroy, "SVN-Gilroy", sans-serif);
    font-size: .75rem;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: #c2a368;
    margin-bottom: 1rem;
}

.td-404__heading {
    font-family: var(--font-display, "Beautique Display Condensed", sans-serif);
    font-size: clamp(1.75rem, 4vw, 2.75rem);
    font-weight: 400;
    color: #f6f4ef;
    line-height: 1.25;
    margin-bottom: 1.25rem;
}

.td-404__desc {
    font-family: var(--font-gilroy, "SVN-Gilroy", sans-serif);
    font-size: .9375rem;
    color: rgba(246,244,239,.55);
    line-height: 1.7;
    margin-bottom: 2.5rem;
}

.td-404__br { display: none; }
@media (min-width: 640px) { .td-404__br { display: inline; } }

.td-404__actions {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    justify-content: center;
}

.td-404__btn {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .75rem 2rem;
    font-family: var(--font-gilroy, "SVN-Gilroy", sans-serif);
    font-size: .8125rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    text-decoration: none;
    transition: background-color .2s, color .2s, border-color .2s;
}

.td-404__btn svg {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
}

.td-404__btn--primary {
    background-color: #c2a368;
    color: #15233f;
}
.td-404__btn--primary:hover {
    background-color: #b99a73;
    color: #15233f;
}

.td-404__btn--outline {
    border: 1px solid rgba(194,163,104,.5);
    color: #c2a368;
}
.td-404__btn--outline:hover {
    border-color: #c2a368;
    background-color: rgba(194,163,104,.08);
    color: #c2a368;
}

/* ── xscroll (horizontal scrollable bar with arrow buttons) ──────────────── */
.fx-xscroll-view {
    overflow-x: auto;
    scrollbar-width: none;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}
.fx-xscroll-view::-webkit-scrollbar {
    display: none;
}
[data-xscroll] {
    position: relative;
    overflow: hidden;
}
.fx-xscroll-arrow {
    position: absolute;
    top: 0;
    bottom: 0;
    z-index: 2;
    width: 3.5rem;
    display: flex;
    align-items: center;
    color: var(--color-brand, #15233f);
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, color 0.2s ease;
    border: none;
    background: none;
    padding: 0;
}
.fx-xscroll-arrow.is-shown {
    opacity: 1;
    pointer-events: auto;
}
.fx-xscroll-arrow:hover {
    color: var(--color-ink, #0f1923);
}
.fx-xscroll-arrow--left {
    left: 0;
    justify-content: flex-start;
    padding-left: 0.5rem;
    background: linear-gradient(to right, var(--color-paper-alt, #f5f1eb) 35%, transparent);
}
.fx-xscroll-arrow--right {
    right: 0;
    justify-content: flex-end;
    padding-right: 0.5rem;
    background: linear-gradient(to left, var(--color-paper-alt, #f5f1eb) 35%, transparent);
}

/* ── fx-swirl-link (animated wavy underline on hover) ───────────────────── */
.fx-swirl-link {
    padding-bottom: 0.5rem;
    display: inline-block;
    position: relative;
}
.fx-swirl {
    pointer-events: none;
    width: 100%;
    height: 0.6rem;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
}
.fx-swirl path {
    stroke-dasharray: 1;
    stroke-dashoffset: 1px;
    transition: stroke-dashoffset 0.7s cubic-bezier(0.19, 1, 0.22, 1);
}
.fx-swirl-link:hover .fx-swirl path,
.fx-swirl-link:focus-visible .fx-swirl path {
    stroke-dashoffset: 0;
}
/* Tab active: hiện underline ngay (không cần hover) */
.fx-swirl-link[aria-selected="true"] .fx-swirl path {
    stroke-dashoffset: 0;
}

/* ── fx-field (input/select styling) ────────────────────────────────────── */
.fx-field {
    border: 1px solid var(--color-line, #d6cfc5);
    background-color: rgba(255,255,255,.95);
    width: 100%;
    color: var(--color-prose, #3a3530);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    border-radius: 0;
    padding: .85rem 1.1rem;
}
.fx-field::placeholder {
    color: var(--color-muted, #a09b94);
}
.fx-field:focus {
    border-color: var(--color-brand, #15233f);
    box-shadow: 0 0 0 1px var(--color-brand, #15233f);
    outline: none;
}

/* ── Pagination (td-pagination wrapper dùng paginate_links) ─────────────── */
.td-pagination .page-numbers {
    display: grid;
    height: 2.25rem;
    min-width: 2.25rem;
    place-items: center;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    font-size: 0.875rem;
    color: var(--color-muted, #a09b94);
    transition: color 0.3s ease, background-color 0.3s ease;
    text-decoration: none;
    line-height: 1;
}
.td-pagination a.page-numbers:hover {
    background-color: var(--color-blush, #c9a0a0);
    color: #fff;
}
.td-pagination .page-numbers.current {
    background-color: var(--color-blush, #c9a0a0);
    color: #fff;
    min-width: 2.25rem;
}
.td-pagination .page-numbers.dots {
    padding-left: 0.25rem;
    padding-right: 0.25rem;
    pointer-events: none;
}
.td-pagination .prev.page-numbers,
.td-pagination .next.page-numbers {
    min-width: 2.25rem;
    width: 2.25rem;
    padding: 0;
}

/* ── Modal ứng tuyển (td-recruit-modal) ─────────────────────────────────── */
.td-recruit-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.td-recruit-modal[hidden] {
    display: none;
}
.td-recruit-modal__backdrop {
    position: absolute;
    inset: 0;
    background-color: rgba(15, 25, 35, 0.65);
    backdrop-filter: blur(3px);
    cursor: pointer;
}
.td-recruit-modal__box {
    position: relative;
    z-index: 1;
    background-color: var(--color-paper-alt, #f5f1eb);
    width: 100%;
    max-width: 42rem;
    max-height: 92vh;
    overflow-y: auto;
    padding: 2rem 1.5rem 2.5rem;
    scrollbar-width: thin;
}
@media (min-width: 640px) {
    .td-recruit-modal__box {
        padding: 2.5rem 3rem 3rem;
    }
}
.td-recruit-modal__close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 2.25rem;
    height: 2.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-muted, #a09b94);
    transition: color 0.2s ease;
    padding: 0;
}
.td-recruit-modal__close:hover {
    color: var(--color-ink, #0f1923);
}

/* ── Thiệp cưới (single-wedding_invitation) ─────────────────────────── */

/* Grid 2:3 cho trang tạo thiệp (form trái : slider phải) */
@media (min-width: 1024px) {
    .td-thiep-grid {
        grid-template-columns: 2fr 3fr !important;
    }
}

/* Select wrapper với mũi tên custom */
.td-thiep-select-wrap {
    position: relative;
}
.td-thiep-select-wrap select {
    padding-right: 2.5rem;
}
.td-thiep-select-arrow {
    pointer-events: none;
    position: absolute;
    inset-block-start: 50%;
    right: 0.875rem;
    transform: translateY(-50%);
    color: var(--color-muted, #a09b94);
    display: flex;
    align-items: center;
}

/* Color swatch radio picker */
.td-thiep-color-label {
    display: block;
    cursor: pointer;
}
.td-thiep-color-swatch {
    display: block;
    width: 2rem;
    height: 2rem;
    border-radius: 9999px;
    border: 2.5px solid transparent;
    transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
    box-shadow: 0 0 0 2px transparent;
}
.td-thiep-color-label input:checked + .td-thiep-color-swatch {
    border-color: var(--color-brand, #1c2b3a);
    box-shadow: 0 0 0 3px var(--color-brand, #1c2b3a);
    transform: scale(1.1);
}
.td-thiep-color-label:hover .td-thiep-color-swatch {
    transform: scale(1.08);
}

/* Preview slider area */
.td-thiep-preview .splide,
.td-thiep-preview .splide__track {
    overflow: visible;
}
.td-thiep-preview .splide__slide img {
    max-height: 72vh;
    width: auto;
    margin: 0 auto;
    display: block;
}

/* Modal kết quả tạo thiệp */
.td-thiep-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.td-thiep-modal__backdrop {
    position: absolute;
    inset: 0;
    background-color: rgba(15, 25, 35, 0.65);
    backdrop-filter: blur(3px);
    cursor: pointer;
}
.td-thiep-modal__box {
    position: relative;
    z-index: 1;
    background-color: var(--color-paper, #faf7f2);
    width: 100%;
    max-width: 36rem;
    max-height: 92vh;
    overflow-y: auto;
    padding: 2rem 1.5rem 2.5rem;
    scrollbar-width: thin;
}
@media (min-width: 640px) {
    .td-thiep-modal__box {
        padding: 2.5rem 3rem 3rem;
    }
}
.td-thiep-modal__close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 2.25rem;
    height: 2.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-muted, #a09b94);
    transition: color 0.2s ease;
    padding: 0;
}
.td-thiep-modal__close:hover {
    color: var(--color-ink, #0f1923);
}
