/**
 * Popup Styles
 *
 * @package PrintShopStudio
 */

/* Overlay */
.pss-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: pss-fade-in 0.3s ease-out;
}

@keyframes pss-fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Container */
.pss-popup-container {
    background: #fff;
    border-radius: 20px;
    max-width: 480px;
    width: 100%;
    position: relative;
    animation: pss-slide-up 0.4s ease-out;
    overflow: hidden;
}

@keyframes pss-slide-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Close Button */
.pss-popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 36px;
    height: 36px;
    background: #f5f5f5;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.2s;
}

.pss-popup-close:hover {
    background: #d63638;
    color: #fff;
}

.pss-popup-close .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

/* Content */
.pss-popup-content {
    padding: 50px 40px 30px;
    text-align: center;
}

/* Discount Badge */
.pss-popup-discount-badge {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #2271b1 0%, #0056b3 100%);
    border-radius: 50%;
    margin-bottom: 25px;
    animation: pss-pulse 2s infinite;
}

@keyframes pss-pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(34, 113, 177, 0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 15px rgba(34, 113, 177, 0);
    }
}

.pss-discount-amount {
    font-size: 36px;
    font-weight: 800;
    color: #fff;
    line-height: 1;
}

.pss-discount-label {
    font-size: 14px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Title & Text */
.pss-popup-title {
    margin: 0 0 10px;
    font-size: 28px;
    font-weight: 700;
    color: #1d2327;
}

.pss-popup-subtitle {
    margin: 0 0 15px;
    font-size: 18px;
    color: #2271b1;
    font-weight: 600;
}

.pss-popup-description {
    margin: 0 0 25px;
    font-size: 14px;
    color: #666;
    line-height: 1.6;
}

/* Form */
.pss-popup-form {
    margin-bottom: 20px;
}

.pss-popup-input-group {
    display: flex;
    gap: 10px;
}

.pss-popup-input-group input[type="email"] {
    flex: 1;
    padding: 15px 20px;
    border: 2px solid #e2e4e7;
    border-radius: 10px;
    font-size: 16px;
    transition: border-color 0.2s;
}

.pss-popup-input-group input[type="email"]:focus {
    outline: none;
    border-color: #2271b1;
}

.pss-popup-submit {
    background: linear-gradient(135deg, #00a32a 0%, #008a20 100%);
    color: #fff;
    border: none;
    padding: 15px 25px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: transform 0.2s, box-shadow 0.2s;
}

.pss-popup-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 163, 42, 0.3);
}

.pss-popup-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Success Message */
.pss-popup-message {
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
    font-weight: 500;
}

.pss-popup-message.success {
    background: #d4edda;
    color: #155724;
}

.pss-popup-message.error {
    background: #f8d7da;
    color: #721c24;
}

/* Privacy Note */
.pss-popup-privacy {
    margin: 0;
    font-size: 11px;
    color: #999;
}

/* No Thanks Button */
.pss-popup-no-thanks {
    display: block;
    width: 100%;
    padding: 15px;
    background: #f5f5f5;
    border: none;
    font-size: 12px;
    color: #666;
    cursor: pointer;
    transition: background 0.2s;
}

.pss-popup-no-thanks:hover {
    background: #e2e4e7;
}

/* Coupon Display */
.pss-popup-coupon-display {
    background: #f8f9fa;
    border: 2px dashed #2271b1;
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
}

.pss-popup-coupon-display p {
    margin: 0 0 10px;
    font-size: 14px;
    color: #666;
}

.pss-popup-coupon-code {
    display: block;
    font-size: 28px;
    font-weight: 800;
    color: #2271b1;
    letter-spacing: 3px;
}

/* Mobile Responsive */
@media (max-width: 520px) {
    .pss-popup-container {
        max-width: 100%;
        border-radius: 12px;
    }

    .pss-popup-content {
        padding: 40px 25px 25px;
    }

    .pss-popup-input-group {
        flex-direction: column;
    }

    .pss-popup-submit {
        width: 100%;
    }

    .pss-popup-discount-badge {
        width: 80px;
        height: 80px;
    }

    .pss-discount-amount {
        font-size: 28px;
    }

    .pss-popup-title {
        font-size: 24px;
    }
}

/* Mobile Landscape (limited height) */
@media (max-height: 500px) {
    .pss-popup-overlay {
        padding: 10px;
    }
    
    .pss-popup-container {
        max-height: 95vh;
        overflow-y: auto;
        border-radius: 10px;
    }
    
    .pss-popup-content {
        padding: 20px 20px 15px;
    }
    
    .pss-popup-discount-badge {
        width: 60px;
        height: 60px;
        margin-bottom: 12px;
    }
    
    .pss-discount-amount {
        font-size: 22px;
    }
    
    .pss-discount-label {
        font-size: 10px;
        letter-spacing: 1px;
    }
    
    .pss-popup-title {
        font-size: 18px;
        margin-bottom: 6px;
    }
    
    .pss-popup-subtitle {
        font-size: 14px;
        margin-bottom: 8px;
    }
    
    .pss-popup-description {
        font-size: 12px;
        margin-bottom: 15px;
    }
    
    .pss-popup-input-group {
        flex-direction: row;
        gap: 8px;
    }
    
    .pss-popup-input-group input[type="email"] {
        padding: 10px 14px;
        font-size: 14px;
    }
    
    .pss-popup-submit {
        padding: 10px 16px;
        font-size: 13px;
    }
    
    .pss-popup-privacy {
        font-size: 10px;
    }
    
    .pss-popup-no-thanks {
        padding: 10px;
        font-size: 11px;
    }
    
    .pss-popup-close {
        top: 8px;
        right: 8px;
        width: 28px;
        height: 28px;
    }
    
    .pss-popup-close .dashicons {
        font-size: 16px;
        width: 16px;
        height: 16px;
    }
}

/* Very small landscape screens */
@media (max-height: 400px) {
    .pss-popup-content {
        padding: 15px 15px 10px;
    }
    
    .pss-popup-discount-badge {
        width: 50px;
        height: 50px;
        margin-bottom: 8px;
    }
    
    .pss-discount-amount {
        font-size: 18px;
    }
    
    .pss-popup-title {
        font-size: 16px;
    }
    
    .pss-popup-subtitle {
        font-size: 12px;
    }
    
    .pss-popup-description {
        display: none;
    }
    
    .pss-popup-form {
        margin-bottom: 10px;
    }
}
