/**
 * Avisale Abandoned Cart - Add to Cart Popup
 */

/* Overlay */
.avisale-ac-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2147483647;
    animation: avisaleOverlayIn 0.3s ease;
}

.avisale-ac-overlay.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Modal */
.avisale-ac-popup {
    background: #fff;
    border-radius: 12px;
    padding: 32px 28px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: avisalePopupIn 0.3s ease;
    text-align: center;
    position: relative;
    z-index: 2147483647;
}

.avisale-ac-popup h3 {
    margin: 0 0 8px;
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.3;
}

.avisale-ac-popup p {
    margin: 0 0 20px;
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

/* Form */
.avisale-ac-popup-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.avisale-ac-popup-form input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    color: #333;
    background: #fafafa;
    transition: border-color 0.2s, background 0.2s;
    box-sizing: border-box;
    outline: none;
    position: relative;
    z-index: 2147483647;
    pointer-events: auto;
}

.avisale-ac-popup-form input:focus {
    border-color: #7f54b3;
    background: #fff;
}

.avisale-ac-popup-form input::placeholder {
    color: #aaa;
}

/* Submit button */
.avisale-ac-popup-submit {
    width: 100%;
    padding: 13px 20px;
    background: #7f54b3;
    color: #fff !important;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    margin-top: 4px;
}

.avisale-ac-popup-submit:hover {
    background: #6b4599;
}

.avisale-ac-popup-submit:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Dismiss link */
.avisale-ac-popup-dismiss {
    display: inline-block;
    margin-top: 14px;
    font-size: 13px;
    color: #999;
    cursor: pointer;
    text-decoration: none;
    transition: color 0.2s;
}

.avisale-ac-popup-dismiss:hover {
    color: #666;
}

/* Error message */
.avisale-ac-popup-error {
    color: #dc3232;
    font-size: 13px;
    margin: 0;
    display: none;
}

/* Animations */
@keyframes avisaleOverlayIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes avisalePopupIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Responsive */
@media (max-width: 480px) {
    .avisale-ac-popup {
        padding: 24px 20px;
        border-radius: 10px;
        width: 94%;
    }

    .avisale-ac-popup h3 {
        font-size: 18px;
    }

    .avisale-ac-popup-form input {
        padding: 11px 12px;
        font-size: 16px; /* Prevents zoom on iOS */
    }

    .avisale-ac-popup-submit {
        padding: 12px 16px;
    }
}
