/* Thắng_dev Simple Popup - Frontend Stylesheet */

/* Overlay Backdrop */
.thangdev-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    opacity: 0;
    transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    visibility: hidden;
}

.thangdev-popup-overlay.is-visible {
    opacity: 1;
    visibility: visible;
}

/* Modal Container */
.thangdev-popup-container {
    background: #ffffff;
    width: 100%;
    border-radius: 16px;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.1);
    overflow: hidden;
    transform: scale(0.85) translateY(20px);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    box-sizing: border-box;
}

.thangdev-popup-overlay.is-visible .thangdev-popup-container {
    transform: scale(1) translateY(0);
}

/* Close Button */
.thangdev-popup-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    background: rgba(0, 0, 0, 0.5);
    color: #ffffff;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    padding: 0;
    margin: 0;
}

.thangdev-popup-close:hover {
    background: #ef4444;
    color: #ffffff;
    transform: rotate(90deg) scale(1.1);
}

/* Title Box */
.thangdev-popup-header-box {
    padding: 18px 24px 14px 24px;
    border-bottom: 1px solid #f1f5f9;
    text-align: center;
}

.thangdev-popup-title {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.3;
}

/* Body & Image */
.thangdev-popup-body {
    position: relative;
    width: 100%;
    line-height: 0;
}

.thangdev-popup-body img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    max-height: 80vh;
}

.thangdev-popup-link {
    display: block;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.thangdev-popup-link:hover {
    opacity: 0.95;
}

/* Mobile Responsiveness */
@media (max-width: 576px) {
    .thangdev-popup-overlay {
        padding: 12px;
    }

    .thangdev-popup-container {
        border-radius: 12px;
    }

    .thangdev-popup-title {
        font-size: 17px;
    }

    .thangdev-popup-close {
        top: 8px;
        right: 8px;
        width: 32px;
        height: 32px;
        font-size: 20px;
    }
}
