/* WC Quiz Practice - First Visit Popup */

/* Overlay */
.wcqp-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
}

.wcqp-popup-overlay.wcqp-popup-visible {
    opacity: 1;
    visibility: visible;
}

.wcqp-popup-overlay.wcqp-popup-hiding {
    opacity: 0;
    visibility: hidden;
}

/* Modal */
.wcqp-popup-modal {
    background: #fff;
    border-radius: 24px;
    max-width: 700px;
    width: 90%;
    position: relative;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.3);
    transform: scale(0.8) translateY(20px);
    transition: all 0.3s ease;
    overflow: hidden;
}

.wcqp-popup-visible .wcqp-popup-modal {
    transform: scale(1) translateY(0);
}

.wcqp-popup-hiding .wcqp-popup-modal {
    transform: scale(0.8) translateY(20px);
}

/* Close Button */
.wcqp-popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    font-size: 24px;
    line-height: 1;
    color: #666;
    cursor: pointer;
    transition: all 0.2s;
    z-index: 10;
}

.wcqp-popup-close:hover {
    background: rgba(0, 0, 0, 0.2);
    color: #333;
}

/* Content Layout */
.wcqp-popup-content {
    display: flex;
    align-items: center;
    padding: 40px;
    gap: 30px;
}

/* Image Section */
.wcqp-popup-image {
    flex: 0 0 220px;
}

.wcqp-popup-image img {
    width: 220px;
    height: 220px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 10px 40px rgba(102, 126, 234, 0.2);
}

/* Text Section */
.wcqp-popup-text {
    flex: 1;
}

.wcqp-popup-text h2 {
    margin: 0 0 15px;
    font-size: 28px;
    font-weight: 700;
    color: #1a1a2e;
    line-height: 1.3;
}

.wcqp-popup-subtitle {
    margin: 0 0 10px;
    font-size: 16px;
    color: #555;
}

.wcqp-popup-subtitle strong {
    color: #1a1a2e;
    display: block;
    margin-top: 5px;
}

.wcqp-popup-desc {
    margin: 0 0 25px;
    font-size: 15px;
    color: #666;
    line-height: 1.6;
}

/* Button */
.wcqp-popup-btn {
    display: inline-block;
    padding: 14px 40px;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.wcqp-popup-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

/* Responsive */
@media (max-width: 700px) {
    .wcqp-popup-modal {
        width: 95%;
        border-radius: 20px;
        max-height: 90vh;
        overflow-y: auto;
    }

    .wcqp-popup-content {
        flex-direction: column;
        text-align: center;
        padding: 25px 20px;
        gap: 20px;
    }

    .wcqp-popup-image {
        flex: none;
    }

    .wcqp-popup-image img {
        width: 140px;
        height: 140px;
    }

    .wcqp-popup-text h2 {
        font-size: 20px;
        margin-bottom: 10px;
    }

    .wcqp-popup-subtitle {
        font-size: 14px;
    }

    .wcqp-popup-subtitle strong {
        display: inline;
    }

    .wcqp-popup-desc {
        font-size: 14px;
        margin-bottom: 20px;
    }

    .wcqp-popup-btn {
        width: 100%;
        padding: 14px 30px;
        font-size: 15px;
    }

    .wcqp-popup-close {
        top: 10px;
        right: 10px;
        width: 32px;
        height: 32px;
        font-size: 20px;
    }
}

@media (max-width: 400px) {
    .wcqp-popup-content {
        padding: 20px 15px;
    }

    .wcqp-popup-image img {
        width: 120px;
        height: 120px;
    }

    .wcqp-popup-text h2 {
        font-size: 18px;
    }

    .wcqp-popup-subtitle,
    .wcqp-popup-desc {
        font-size: 13px;
    }
}

/* Safe area for notched phones */
@supports (padding: env(safe-area-inset-bottom)) {
    .wcqp-popup-overlay {
        padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
    }
}