/**
 * Epic Key Popup Styles
 * Beautiful, modern popup designs with Moroccan flair
 */

/* ============================
   GENERAL POPUP STYLES
   ============================ */

.swal2-popup {
    border-radius: 20px !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3) !important;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.swal2-title {
    font-size: 28px !important;
    font-weight: 700 !important;
    color: #2c3e50;
    margin-bottom: 20px !important;
}

.swal-input {
    width: 100%;
    padding: 12px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
    margin: 15px 0;
}

.swal-input:focus {
    border-color: #00b96b;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 185, 107, 0.1);
}

.benefits-list {
    list-style: none;
    padding: 0;
    margin: 20px 0;
    text-align: left;
}

.benefits-list li {
    padding: 10px 0;
    font-size: 16px;
    line-height: 1.6;
    color: #34495e;
    border-bottom: 1px solid #f0f0f0;
}

.benefits-list li:last-child {
    border-bottom: none;
}

.btn-premium {
    background: linear-gradient(135deg, #00b96b 0%, #00a85f 100%) !important;
    border: none !important;
    padding: 14px 30px !important;
    font-size: 18px !important;
    font-weight: 600 !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 15px rgba(0, 185, 107, 0.3) !important;
    transition: all 0.3s ease !important;
}

.btn-premium:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(0, 185, 107, 0.4) !important;
}

.btn-premium.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* ============================
   EXIT INTENT POPUP
   ============================ */

.exit-intent-popup {
    max-width: 600px !important;
}

.exit-popup h3 {
    color: #e74c3c;
    font-size: 24px;
    margin-bottom: 15px;
}

.exit-popup p {
    font-size: 16px;
    color: #555;
    margin-bottom: 20px;
}

.exit-popup .benefits-list strong {
    color: #00b96b;
}

.promo-code {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 12px;
    font-size: 32px;
    font-weight: 700;
    letter-spacing: 3px;
    margin: 20px 0;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
    position: relative;
    overflow: hidden;
}

.promo-code::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent,
        rgba(255, 255, 255, 0.1),
        transparent
    );
    transform: rotate(45deg);
    animation: shine 3s infinite;
}

@keyframes shine {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }
    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}

/* ============================
   NEWSLETTER POPUP
   ============================ */

.newsletter-popup {
    max-width: 550px !important;
}

.newsletter-popup .benefits-list {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    margin: 20px 0;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
    font-size: 14px;
    color: #666;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

/* ============================
   PREMIUM PRODUCT POPUP
   ============================ */

.premium-product-popup {
    max-width: 650px !important;
    background: linear-gradient(to bottom, #ffffff 0%, #f8f9fa 100%) !important;
}

.premium-popup h3 {
    color: #2c3e50;
    font-size: 22px;
    margin-bottom: 10px;
}

.premium-price {
    font-size: 36px;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 10px 0;
}

.premium-benefits {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    margin: 20px 0;
    text-align: left;
}

.premium-benefits h4 {
    color: #00b96b;
    font-size: 18px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.premium-benefits ul {
    list-style: none;
    padding: 0;
}

.premium-benefits li {
    padding: 12px 0;
    font-size: 15px;
    color: #34495e;
    border-bottom: 1px solid #ecf0f1;
}

.premium-benefits li:last-child {
    border-bottom: none;
}

.premium-cta {
    background: linear-gradient(135deg, #ffeaa7 0%, #fdcb6e 100%);
    padding: 20px;
    border-radius: 12px;
    margin-top: 20px;
}

.premium-cta p {
    margin: 0;
    font-size: 16px;
    color: #2d3436;
}

/* ============================
   NEW ARRIVAL POPUP
   ============================ */

.new-arrival-popup {
    max-width: 800px !important;
}

.new-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin: 25px 0;
}

.new-product-card {
    background: white;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    text-align: center;
}

.new-product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.new-product-card img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 10px;
}

.new-product-card h5 {
    font-size: 14px;
    color: #2c3e50;
    margin: 10px 0;
    min-height: 40px;
}

.new-product-card .price {
    font-size: 18px;
    font-weight: 700;
    color: #00b96b;
    margin: 8px 0;
}

.new-product-card .btn-view {
    display: inline-block;
    background: #00b96b;
    color: white;
    padding: 8px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
}

.new-product-card .btn-view:hover {
    background: #00a85f;
    transform: scale(1.05);
}

.btn-view-all {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 30px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    margin-top: 20px;
    transition: all 0.3s ease;
}

.btn-view-all:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.loading {
    text-align: center;
    padding: 40px;
    color: #999;
    font-style: italic;
}

/* ============================
   CART ABANDONMENT POPUP
   ============================ */

.cart-abandonment-popup {
    max-width: 550px !important;
}

.cart-abandonment-popup p {
    font-size: 18px;
    color: #2c3e50;
    margin-bottom: 20px;
}

.offer-box {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    padding: 25px;
    border-radius: 15px;
    border: 2px solid #00b96b;
    margin: 20px 0;
}

.offer-box h4 {
    color: #2e7d32;
    font-size: 20px;
    margin-bottom: 10px;
}

.offer-box p {
    font-size: 15px;
    color: #1b5e20;
    margin-bottom: 15px;
}

.offer-box ul {
    list-style: none;
    padding: 0;
    margin: 15px 0;
}

.offer-box li {
    padding: 8px 0;
    font-size: 15px;
    color: #2e7d32;
}

.offer-box .promo-code {
    background: white;
    color: #00b96b;
    font-size: 24px;
    padding: 15px;
    margin-top: 15px;
}

/* ============================
   RESPONSIVE DESIGN
   ============================ */

@media (max-width: 768px) {
    .swal2-popup {
        width: 95% !important;
        margin: 10px;
    }
    
    .swal2-title {
        font-size: 22px !important;
    }
    
    .benefits-list li {
        font-size: 14px;
    }
    
    .promo-code {
        font-size: 24px;
        padding: 15px;
    }
    
    .premium-price {
        font-size: 28px;
    }
    
    .new-products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .new-product-card img {
        height: 100px;
    }
    
    .btn-premium {
        font-size: 16px !important;
        padding: 12px 24px !important;
    }
}

@media (max-width: 480px) {
    .promo-code {
        font-size: 20px;
        letter-spacing: 2px;
    }
    
    .new-products-grid {
        grid-template-columns: 1fr;
    }
    
    .premium-benefits {
        padding: 15px;
    }
}

/* ============================
   ANIMATIONS & EFFECTS
   ============================ */

.swal2-show {
    animation: slideInDown 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translate3d(0, -100%, 0) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0) scale(1);
    }
}

.swal2-hide {
    animation: slideOutUp 0.3s ease-out;
}

@keyframes slideOutUp {
    from {
        opacity: 1;
        transform: translate3d(0, 0, 0) scale(1);
    }
    to {
        opacity: 0;
        transform: translate3d(0, -100%, 0) scale(0.8);
    }
}

/* Floating animation for important elements */
.float-animation {
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* ============================
   MOROCCAN THEME ENHANCEMENTS
   ============================ */

.moroccan-pattern {
    background-image: 
        linear-gradient(45deg, rgba(0, 185, 107, 0.05) 25%, transparent 25%),
        linear-gradient(-45deg, rgba(0, 185, 107, 0.05) 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, rgba(0, 185, 107, 0.05) 75%),
        linear-gradient(-45deg, transparent 75%, rgba(0, 185, 107, 0.05) 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
}

/* Success checkmark animation */
@keyframes checkmark {
    0% {
        height: 0;
        width: 0;
        opacity: 1;
    }
    20% {
        height: 0;
        width: 10px;
        opacity: 1;
    }
    40% {
        height: 20px;
        width: 10px;
        opacity: 1;
    }
    100% {
        height: 20px;
        width: 10px;
        opacity: 1;
    }
}
