/**
 * Common Popup Styles
 * Version: 1.0.0
 * 
 * Styles for popup overlay and box triggered by js-trigger-popup class
 */

/* ===================================
   Popup Overlay
   =================================== */

.popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    animation: fadeIn 0.3s ease;
}

.popup-overlay.fade-out {
    animation: fadeOut 0.3s ease;
}

/* ===================================
   Popup Box
   =================================== */

.popup-box {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    text-align: center;
    max-width: 450px;
    width: 90%;
    animation: slideUp 0.4s ease;
}

.popup-box.shake {
    animation: shake 0.5s;
}

/* ===================================
   Popup Content
   =================================== */

.popup-icon {
    font-size: 50px;
    margin-bottom: 20px;
    display: block;
}

.popup-title {
    color: #fff;
    font-size: 24px;
    margin: 0 0 15px 0;
    font-weight: 600;
}

.popup-message {
    color: #f0f0f0;
    font-size: 16px;
    margin: 0 0 30px 0;
    line-height: 1.6;
}

/* ===================================
   Popup Button
   =================================== */

.popup-button {
    display: inline-block;
    background: #fff;
    color: #667eea;
    padding: 15px 40px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    border: none;
}

.popup-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    background: #f8f9ff;
}

.popup-button:active {
    transform: translateY(0);
}

.popup-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* ===================================
   Animations
   =================================== */

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

@keyframes slideUp {
    from {
        transform: translate(-50%, -40%);
        opacity: 0;
    }

    to {
        transform: translate(-50%, -50%);
        opacity: 1;
    }
}

@keyframes shake {

    0%,
    100% {
        transform: translate(-50%, -50%);
    }

    25% {
        transform: translate(-48%, -50%);
    }

    75% {
        transform: translate(-52%, -50%);
    }
}

/* ===================================
   Responsive Design
   =================================== */

@media (max-width: 640px) {
    .popup-box {
        padding: 30px 20px;
        width: 85%;
    }

    .popup-title {
        font-size: 20px;
    }

    .popup-message {
        font-size: 14px;
    }

    .popup-button {
        padding: 12px 30px;
        font-size: 14px;
    }

    .popup-icon {
        font-size: 40px;
    }
}

/* ===================================
   Trigger Element Styles (Optional)
   =================================== */

/* Add visual indicator that element will trigger popup */
.js-trigger-popup {
    position: relative;
}

.js-trigger-popup::after {
    content: '';
    /* Optional: Add indicator icon or badge */
}

/* Prevent text selection on trigger elements */
.js-trigger-popup {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}