/* ============================================================
   THỊNH POPUP ANYTHING - FRONTEND STYLES
   ============================================================ */

/* Body Lock when Modal is Open */
body.thinh-modal-open {
    overflow: hidden !important;
}

/* Modal Overlay Background */
.thinh-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.thinh-modal-overlay.thinh-show {
    opacity: 1 !important;
    visibility: visible !important;
}

/* Modal Dialog Box */
.thinh-modal-dialog {
    position: relative;
    width: 100%;
    max-height: 90vh;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.1);
    transform: scale(0.85);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.thinh-modal-overlay.thinh-show .thinh-modal-dialog {
    transform: scale(1);
}

/* Modal Body */
.thinh-modal-body {
    padding: 35px 30px;
    overflow-y: auto;
    color: #2c3e50;
    font-size: 1rem;
    line-height: 1.6;
}

.thinh-modal-body img {
    max-width: 100%;
    height: auto;
}

/* Close Button (X) - CIRCULAR BUTTON AT TOP RIGHT OF SCREEN WITH WHITE BORDER */
.thinh-modal-close {
    position: fixed !important;
    top: 25px !important;
    right: 25px !important;
    width: 40px !important;
    height: 40px !important;
    background: rgba(0, 0, 0, 0.75) !important;
    border: 2px solid rgba(255, 255, 255, 0.85) !important;
    border-radius: 50% !important;
    color: #ffffff !important;
    font-size: 22px !important;
    font-weight: 400 !important;
    font-family: Arial, sans-serif !important;
    line-height: 36px !important;
    text-align: center !important;
    cursor: pointer !important;
    z-index: 9999999 !important;
    transition: transform 0.25s ease, background 0.25s ease, opacity 0.25s ease !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5) !important;
    outline: none !important;
    opacity: 0.9;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    pointer-events: auto !important;
}

.thinh-modal-close:hover {
    opacity: 1 !important;
    background: #000000 !important;
    border-color: #ffffff !important;
    transform: scale(1.12) rotate(90deg) !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.7) !important;
}

/* ANIMATIONS */
/* Zoom In */
.thinh-anim-zoomIn {
    transform: scale(0.7);
}

.thinh-modal-overlay.thinh-show .thinh-anim-zoomIn {
    transform: scale(1);
}

/* Fade In */
.thinh-anim-fadeIn {
    transform: scale(1);
    opacity: 0;
}

.thinh-modal-overlay.thinh-show .thinh-anim-fadeIn {
    opacity: 1;
}

/* Slide Down */
.thinh-anim-slideDown {
    transform: translateY(-80px);
}

.thinh-modal-overlay.thinh-show .thinh-anim-slideDown {
    transform: translateY(0);
}

/* Bounce In */
.thinh-anim-bounceIn {
    transform: scale(0.5);
}

.thinh-modal-overlay.thinh-show .thinh-anim-bounceIn {
    transform: scale(1);
    animation: thinhBounce 0.5s ease;
}

@keyframes thinhBounce {
    0% {
        transform: scale(0.5);
    }

    60% {
        transform: scale(1.05);
    }

    80% {
        transform: scale(0.95);
    }

    100% {
        transform: scale(1);
    }
}

/* ============================================================
   TRIGGER ELEMENT STYLES (BUTTON / TEXT / IMAGE)
   ============================================================ */

.thinh-popup-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: inherit;
}

/* Button Styles */
button.thinh-popup-trigger {
    padding: 12px 28px;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    outline: none;
}

button.thinh-popup-trigger:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.22);
}

button.thinh-btn-style-round {
    border-radius: 50px !important;
}

button.thinh-btn-style-outline {
    background: transparent !important;
    border: 2px solid currentColor !important;
}

button.thinh-btn-style-gold {
    background: linear-gradient(135deg, #d4b86a 0%, #b5840d 100%) !important;
    color: #ffffff !important;
    border: none !important;
    box-shadow: 0 4px 15px rgba(181, 132, 13, 0.4);
}

/* Text Link Styles */
a.thinh-text-trigger {
    text-decoration: none;
    font-size: 1.05rem;
}

a.text-style-underline {
    text-decoration: underline !important;
}

a.text-style-bold {
    font-weight: 700 !important;
}

a.thinh-text-trigger:hover {
    opacity: 0.8;
}

/* Image Trigger */
img.thinh-img-trigger {
    transition: transform 0.25s ease;
}

img.thinh-img-trigger:hover {
    transform: scale(1.03);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .thinh-modal-overlay {
        padding: 12px;
    }

    .thinh-modal-body {
        padding: 25px 20px;
    }

    .thinh-modal-close {
        top: 15px !important;
        right: 15px !important;
        width: 36px !important;
        height: 36px !important;
        font-size: 18px !important;
    }
}