/* === OVERLAY === */
.dpu-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
    overflow-y: auto;
    padding: 20px;
}
.dpu-overlay.dpu-visible { opacity: 1; }
.dpu-overlay.dpu-hidden { pointer-events: none; opacity: 0; }

/* === POSITIONS === */
.dpu-position-bottom {
    align-items: flex-end;
    padding: 0;
}
.dpu-position-bottom .dpu-popup {
    border-radius: 0;
    max-width: 100%;
    width: 100%;
}
.dpu-position-top {
    align-items: flex-start;
    padding: 0;
}
.dpu-position-top .dpu-popup {
    border-radius: 0;
    max-width: 100%;
    width: 100%;
}
.dpu-position-bottom-left {
    align-items: flex-end;
    justify-content: flex-start;
    padding: 20px;
}
.dpu-position-bottom-right {
    align-items: flex-end;
    justify-content: flex-end;
    padding: 20px;
}
.dpu-position-bottom-left .dpu-popup,
.dpu-position-bottom-right .dpu-popup {
    max-width: 400px;
}
.dpu-position-fullscreen .dpu-popup {
    max-width: 100%;
    width: 100%;
    min-height: 100vh;
    border-radius: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* === POPUP === */
.dpu-popup {
    position: relative;
    width: 100%;
    padding: 40px;
    box-shadow: 0 25px 60px rgba(0,0,0,0.3);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.6;
    transform: translateY(20px);
    transition: transform 0.4s ease;
}
.dpu-visible .dpu-popup { transform: translateY(0); }

/* === ANIMATIONS === */
.dpu-anim-slide-up .dpu-popup { transform: translateY(100px); }
.dpu-anim-slide-up.dpu-visible .dpu-popup { transform: translateY(0); }
.dpu-anim-slide-down .dpu-popup { transform: translateY(-100px); }
.dpu-anim-slide-down.dpu-visible .dpu-popup { transform: translateY(0); }
.dpu-anim-scale .dpu-popup { transform: scale(0.8); }
.dpu-anim-scale.dpu-visible .dpu-popup { transform: scale(1); }
.dpu-anim-bounce.dpu-visible .dpu-popup {
    animation: dpuBounce 0.6s ease;
}
@keyframes dpuBounce {
    0%   { transform: scale(0.3); opacity: 0; }
    50%  { transform: scale(1.05); }
    70%  { transform: scale(0.95); }
    100% { transform: scale(1); opacity: 1; }
}

/* === HEADER === */
.dpu-popup-header {
    text-align: center;
    margin-bottom: 20px;
}
.dpu-icon {
    margin-bottom: 10px;
    opacity: 0.8;
}
.dpu-popup-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 5px 0;
    line-height: 1.3;
}

/* === BODY === */
.dpu-popup-body {
    margin-bottom: 25px;
}
.dpu-popup-message {
    font-size: 15px;
    max-height: 300px;
    overflow-y: auto;
    padding-right: 10px;
}
.dpu-popup-message p { margin: 0 0 10px 0; }
.dpu-popup-message::-webkit-scrollbar { width: 4px; }
.dpu-popup-message::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.2);
    border-radius: 4px;
}

/* === CHECKBOX === */
.dpu-checkbox-wrap {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 15px;
    padding: 12px 15px;
    background: rgba(0,0,0,0.04);
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
}
.dpu-checkbox {
    margin-top: 3px;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* === FOOTER / BUTTONS === */
.dpu-popup-footer {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}
.dpu-btn {
    padding: 14px 32px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    min-width: 140px;
    text-transform: none;
    letter-spacing: 0.3px;
}
.dpu-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 15px rgba(0,0,0,0.2); }
.dpu-btn:active { transform: translateY(0); }
.dpu-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* === TEMPLATES === */
.dpu-template-modern .dpu-popup {
    border-top: 5px solid;
    border-image: linear-gradient(135deg, #667eea 0%, #764ba2 100%) 1;
}
.dpu-template-minimal .dpu-popup {
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
    border: 1px solid #e0e0e0;
    padding: 30px;
}
.dpu-template-minimal .dpu-popup-header { text-align: left; }
.dpu-template-minimal .dpu-popup-footer { justify-content: flex-end; }
.dpu-template-minimal .dpu-icon { display: none; }

.dpu-template-dark .dpu-popup {
    background: #1a1a2e !important;
    color: #e0e0e0 !important;
}
.dpu-template-dark .dpu-checkbox-wrap { background: rgba(255,255,255,0.05); }

.dpu-template-legal .dpu-popup {
    border: 2px solid #333;
    border-radius: 4px !important;
    font-family: "Georgia", "Times New Roman", serif;
}
.dpu-template-legal .dpu-popup-title { font-size: 20px; text-transform: uppercase; letter-spacing: 2px; }
.dpu-template-legal .dpu-btn { border-radius: 2px; text-transform: uppercase; font-size: 13px; letter-spacing: 1px; }

/* === RESPONSIVE === */
@media (max-width: 600px) {
    .dpu-popup { padding: 25px 20px; }
    .dpu-popup-title { font-size: 20px; }
    .dpu-popup-footer { flex-direction: column; }
    .dpu-btn { width: 100%; }
    .dpu-position-bottom-left,
    .dpu-position-bottom-right {
        justify-content: center;
        padding: 10px;
    }
}