.dwsp-modal[hidden] {
    display: none !important;
}

.dwsp-modal {
    position: fixed;
    inset: 0;
    z-index: 999999;
}

.dwsp-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.72);
}

.dwsp-shell {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 12px;
    z-index: 2;
}

.dwsp-dialog {
    position: relative;
    display: block;
    overflow: hidden;
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 20px 80px rgba(0, 0, 0, 0.38);
    transform-origin: center center;
}

.dwsp-dialog.is-image-only {
    background: transparent;
    border-radius: 0;
    box-shadow: none;
}

.dwsp-dialog.is-image-only .dwsp-image-layer {
    background: transparent;
}

.dwsp-dialog.is-image-only .dwsp-image {
    object-fit: cover;
}

.dwsp-image-layer,
.dwsp-overlay-content {
    position: absolute;
    inset: 0;
}

.dwsp-image-layer {
    background: #ffffff;
}

.dwsp-image {
    display: block;
    width: 100%;
    height: 100%;
}

.dwsp-fit-contain {
    object-fit: contain;
}

.dwsp-fit-cover {
    object-fit: cover;
}

.dwsp-fit-fill {
    object-fit: fill;
}

.dwsp-overlay-content {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 34px;
    color: #ffffff;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.36);
    pointer-events: none;
}

.dwsp-dialog.has-overlay-content .dwsp-overlay-content::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.08) 0%, rgba(0, 0, 0, 0.32) 100%);
    pointer-events: none;
}

.dwsp-dialog.has-overlay-content .dwsp-overlay-content > * {
    position: relative;
    z-index: 1;
}

.dwsp-position-top-left .dwsp-overlay-content {
    align-items: flex-start;
    justify-content: flex-start;
    text-align: left;
}

.dwsp-position-top-center .dwsp-overlay-content {
    align-items: center;
    justify-content: flex-start;
    text-align: center;
}

.dwsp-position-center .dwsp-overlay-content {
    align-items: center;
    justify-content: center;
    text-align: center;
}

.dwsp-position-bottom-left .dwsp-overlay-content {
    align-items: flex-start;
    justify-content: flex-end;
    text-align: left;
}

.dwsp-position-bottom-center .dwsp-overlay-content {
    align-items: center;
    justify-content: flex-end;
    text-align: center;
}

.dwsp-position-bottom-right .dwsp-overlay-content {
    align-items: flex-end;
    justify-content: flex-end;
    text-align: right;
}

.dwsp-logo-wrap {
    max-width: 220px;
}

.dwsp-logo {
    display: block;
    max-width: 100%;
    max-height: 84px;
    width: auto;
    height: auto;
}

.dwsp-title {
    margin: 0;
    font-size: clamp(28px, 4vw, 54px);
    line-height: 1.08;
}

.dwsp-text {
    max-width: min(84%, 640px);
    font-size: clamp(15px, 1.7vw, 22px);
    line-height: 1.45;
}

.dwsp-text p {
    margin: 0;
}

.dwsp-text p + p {
    margin-top: 8px;
}

.dwsp-close {
    all: unset;
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 5;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    border-radius: 999px;
    background: rgba(17, 24, 39, 0.78);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.26);
    cursor: pointer;
    transition: background 0.18s ease, transform 0.18s ease, opacity 0.18s ease;
}

.dwsp-close:hover,
.dwsp-close:focus-visible {
    background: rgba(17, 24, 39, 0.92);
    transform: scale(1.04);
}

.dwsp-close-icon {
    position: relative;
    display: block;
    width: 14px;
    height: 14px;
}

.dwsp-close-icon::before,
.dwsp-close-icon::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 2px;
    border-radius: 999px;
    background: #ffffff;
    transform-origin: center;
}

.dwsp-close-icon::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.dwsp-close-icon::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

body.dwsp-popup-open {
    overflow: hidden;
}

@media (max-width: 768px) {
    .dwsp-dialog {
        border-radius: 14px;
    }

    .dwsp-overlay-content {
        padding: 22px;
        gap: 10px;
    }

    .dwsp-logo-wrap {
        max-width: 170px;
    }

    .dwsp-logo {
        max-height: 58px;
    }

    .dwsp-text {
        max-width: 92%;
    }

    .dwsp-close {
        top: 10px;
        right: 10px;
        width: 34px;
        height: 34px;
    }

    .dwsp-close-icon {
        width: 12px;
        height: 12px;
    }

    .dwsp-close-icon::before,
    .dwsp-close-icon::after {
        width: 14px;
    }
}
