/* ========================================
   DWR Intro Popup Modal — Fixed Size Design
   ======================================== */

/* Dark Overlay */
.dwr-intro-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    z-index: 999998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.dwr-intro-overlay--active {
    opacity: 1;
    visibility: visible;
}

/* ---- Fixed-Size Centered Modal ---- */
.dwr-intro-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    z-index: 999999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                visibility 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    /* Fixed width, auto height so footer can sit below */
    width: 720px;
    height: auto;
    border-radius: 0;
    overflow: visible;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    border: none;
    background: transparent;
}

.dwr-intro-modal--active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

/* Prevent body scroll */
.dwr-modal-open {
    overflow: hidden !important;
}

/* ---- Close Button (X) top-right — HIDDEN ---- */
.dwr-intro-modal__close-top {
    display: none !important;
}

/* ---- Layout ---- */
.dwr-intro-modal .dwr-intro-layout {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    min-height: auto !important;
    background: transparent;
}

/* ---- Hero / Slideshow Area — the visual card ---- */
.dwr-intro-modal__hero {
    position: relative;
    width: 100%;
    height: 540px;
    overflow: hidden;
    border-radius: 16px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5);
}

.dwr-media-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}

.dwr-slideshow {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.dwr-slideshow__slides {
    position: relative;
    width: 100%;
    height: 100%;
}

.dwr-slideshow__slide {
    display: none;
    width: 100%;
    height: 100%;
}

.dwr-slideshow__slide--active {
    display: block;
    animation: dwrFadeIn 0.6s ease-in-out;
}

@keyframes dwrFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Image fills the entire slide area, cropped to fit */
.dwr-slideshow__image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.dwr-slide-link {
    display: block;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.dwr-slideshow__video {
    width: 100%;
    height: 100%;
}

.dwr-slideshow__video iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* ---- Navigation Dots — bottom of image ---- */
.dwr-slideshow__dots {
    position: absolute;
    bottom: 46px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    z-index: 10;
}

.dwr-slideshow__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(80, 80, 80, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.5);
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
    transition: all 0.3s ease;
    padding: 0;
}

.dwr-slideshow__dot:hover {
    background: rgba(60, 60, 60, 0.8);
}

.dwr-slideshow__dot--active {
    background: rgba(50, 50, 50, 0.9);
    border-color: #fff;
    transform: scale(1.2);
}

/* ---- Footer — below the modal card ---- */
.dwr-intro-modal__footer {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 14px;
    background: transparent;
}

.dwr-intro-modal__footer-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.dwr-intro-modal__logo {
    display: none;
}

.dwr-intro-modal__actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* ---- Buttons ---- */
.dwr-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 28px;
    border-radius: 8px;
    border: none;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
    font-family: 'Sarabun', 'Noto Sans Thai', sans-serif;
}

.dwr-btn--primary {
    background: #d6a354;
    color: #fff;
}

.dwr-btn--primary:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

.dwr-btn--secondary {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.35);
}

.dwr-btn--secondary:hover {
    background: rgba(255, 255, 255, 0.25);
}

.dwr-btn--outline {
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.dwr-btn--outline:hover {
    background: rgba(255, 255, 255, 0.1);
}

.dwr-btn--gray {
    background: #d1d5db;
    color: #374151;
}

/* ---- Hide body/content sections in popup ---- */
.dwr-intro-modal__body {
    display: none !important;
    height: 0;
    overflow: hidden;
}

/* ---- Signing Section (hidden by default) ---- */
#dwr-signing-section {
    display: none;
    padding: 24px;
    background: #111;
    max-height: 65vh;
    overflow-y: auto;
}

.dwr-signing-main {
    max-width: 100%;
}

/* ---- Form Styling ---- */
.dwr-form-row {
    margin-bottom: 14px;
}

.dwr-form-label {
    display: block;
    color: #ccc;
    font-size: 14px;
    margin-bottom: 5px;
}

.dwr-form-input input,
.dwr-form-input textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #444;
    border-radius: 8px;
    background: #1a1a1a;
    color: #fff;
    font-size: 15px;
    font-family: inherit;
}

.dwr-form-input input:focus,
.dwr-form-input textarea:focus {
    outline: none;
    border-color: #d6a354;
}

.dwr-form-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 20px;
}

.dwr-form-message {
    text-align: center;
    padding: 10px;
    border-radius: 8px;
    font-size: 14px;
}

.dwr-form-message--success {
    background: #065f46;
    color: #a7f3d0;
}

.dwr-form-message--error {
    background: #7f1d1d;
    color: #fecaca;
}

.dwr-field-error {
    color: #ef4444;
    font-size: 12px;
    margin-top: 3px;
}

.dwr-signing-card {
    background: transparent;
}

.dwr-signing-layout {
    padding: 0;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .dwr-intro-modal {
        width: 94vw;
        height: 70vh;
        border-radius: 12px;
    }

    .dwr-intro-modal__close-top {
        top: 8px;
        right: 8px;
        width: 32px;
        height: 32px;
    }

    .dwr-btn {
        padding: 8px 20px;
        font-size: 14px;
    }

    .dwr-slideshow__dots {
        bottom: 10px;
        gap: 8px;
    }

    .dwr-slideshow__dot {
        width: 8px;
        height: 8px;
    }
}
