/**
 * Popup Manager Stylesheet
 *
 * Contains all styles for the popup overlay, layout, and close functionality.
 * This file is automatically versioned using filemtime().
 */

.dt-popup__overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dt-popup__box {
    position: relative;
    max-width: 46.875rem;
    width: 90%;
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    animation: fadeIn 0.3s ease-in-out;
}

.dt-popup__image img {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

.dt-popup__content {
    font-size: 1rem;
    line-height: 1.6;
    color: #333;
    margin-top: 1rem;
}

/* --------------------------
 * Popup close button styling
 * -------------------------- */
.dt-popup__close {
    position: absolute;
    top: 0;
    right: 0;
    width: 45px;
    height: 45px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1;
}

/* X icon */
.dt-popup__close::before,
.dt-popup__close::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 20px;
    height: 2px;
    background-color: #ffffff;
    transform-origin: center;
    transition: background-color 0.3s;
}

.dt-popup__close::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.dt-popup__close::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

.dt-popup__close:hover::before,
.dt-popup__close:hover::after {
    opacity: 60%;
}

.dt-popup.dt-popup--image .dt-popup__box {
    padding: 0;
}

.dt-popup.dt-popup--image .dt-popup__close {
    top: 1rem;
    right: 1rem;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}