/* AllStars Exit-Intent Feedback Survey Styles */
.as-exit-survey-wrap {
    width: 100%;
    max-width: 680px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #1e293b;
    box-sizing: border-box;
    text-align: center;
}

.as-exit-survey-wrap * {
    box-sizing: border-box;
}

/* RTL Support */
.as-exit-survey-wrap.as-lang-ar {
    direction: rtl;
    text-align: right;
    font-family: "Cairo", "Almarai", Tahoma, "Segoe UI", Arial, sans-serif;
}

.as-survey-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 30px 36px 36px;
    position: relative;
}

@media (max-width: 600px) {
    .as-survey-card {
        padding: 20px 18px 24px;
    }
}

/* Header */
.as-survey-header {
    text-align: center;
    margin-bottom: 24px;
}

.as-badge-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: rgba(244, 165, 28, 0.14);
    color: #f4a51c;
    margin-bottom: 14px;
}

.as-survey-title {
    font-size: 26px;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 10px 0;
    line-height: 1.3;
}

.as-survey-subtitle {
    font-size: 15px;
    color: #64748b;
    margin: 0 auto;
    max-width: 520px;
    line-height: 1.6;
}

/* Quick Chips */
.as-quick-chips-wrap {
    margin-bottom: 20px;
    text-align: left;
}

.as-lang-ar .as-quick-chips-wrap {
    text-align: right;
}

.as-chips-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 10px;
}

.as-chips-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.as-chip {
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 24px;
    padding: 7px 14px;
    font-size: 13px;
    font-weight: 500;
    color: #334155;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    line-height: 1.4;
    user-select: none;
}

.as-chip:hover {
    border-color: #f4a51c;
    background: rgba(244, 165, 28, 0.08);
    color: #b45309;
}

.as-chip.as-chip-active {
    border-color: #f4a51c;
    background: #f4a51c;
    color: #ffffff;
    box-shadow: 0 3px 10px rgba(244, 165, 28, 0.35);
    transform: translateY(-1px);
}

/* Input Field */
.as-input-group {
    margin-bottom: 20px;
    text-align: left;
}

.as-lang-ar .as-input-group {
    text-align: right;
}

.as-input-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 8px;
}

.as-textarea {
    width: 100%;
    min-height: 85px;
    border: 1.5px solid #cbd5e1;
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 14px;
    line-height: 1.5;
    color: #0f172a;
    background: #ffffff;
    outline: none;
    resize: vertical;
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: inherit;
}

.as-textarea:focus {
    border-color: #f4a51c;
    box-shadow: 0 0 0 3px rgba(244, 165, 28, 0.2);
}

.as-textarea::placeholder {
    color: #94a3b8;
}

/* Alerts */
.as-form-alert {
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 16px;
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
    text-align: center;
}

/* Actions Group */
.as-actions-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.as-submit-btn {
    width: 100%;
    background: #f4a51c;
    color: #ffffff;
    border: none;
    border-radius: 12px;
    padding: 14px 28px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(244, 165, 28, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
}

.as-submit-btn:hover {
    background: #e09415;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(244, 165, 28, 0.5);
}

.as-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.as-dismiss-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 13px;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 6px;
    transition: color 0.15s;
    text-decoration: underline;
}

.as-dismiss-btn:hover {
    color: #475569;
}

/* Spinner Animation */
.as-spin {
    animation: as-spin-anim 0.8s linear infinite;
}

@keyframes as-spin-anim {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Success Card */
.as-success-card {
    text-align: center;
    padding: 15px 0 10px;
    animation: as-fade-in 0.3s ease-out;
}

@keyframes as-fade-in {
    from { opacity: 0; transform: scale(0.96); }
    to { opacity: 1; transform: scale(1); }
}

.as-success-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: rgba(244, 165, 28, 0.14);
    margin-bottom: 16px;
}

.as-success-title {
    font-size: 24px;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 10px 0;
}

.as-success-desc {
    font-size: 15px;
    color: #64748b;
    margin: 0 auto 24px;
    max-width: 480px;
    line-height: 1.6;
}

/* Coupon Box */
.as-coupon-box {
    background: #fffbeb;
    border: 2px dashed #f59e0b;
    border-radius: 14px;
    padding: 18px 24px;
    margin: 0 auto 24px;
    max-width: 420px;
}

.as-coupon-tag {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #92400e;
    margin-bottom: 10px;
}

.as-coupon-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.as-coupon-code {
    font-family: "Courier New", Courier, monospace;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 2px;
    color: #b45309;
    background: #fef3c7;
    padding: 6px 16px;
    border-radius: 8px;
    border: 1px solid #fde68a;
    user-select: all;
}

.as-copy-btn {
    background: #f4a51c;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.as-copy-btn:hover {
    background: #d97706;
}

.as-copy-notice {
    display: block;
    margin-top: 8px;
    font-size: 12px;
    font-weight: 600;
    color: #059669;
}

.as-continue-shopping-btn {
    display: inline-block;
    background: #0f172a;
    color: #ffffff;
    border: none;
    border-radius: 12px;
    padding: 12px 30px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
    text-decoration: none;
}

.as-continue-shopping-btn:hover {
    background: #334155;
    color: #ffffff;
}

/* Override WoodMart popup container padding & background for clean card appearance */
.wd-popup-builder:has(.as-exit-survey-wrap) {
    background: #ffffff !important;
    padding: 0 !important;
    border-radius: 16px !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25) !important;
}

.mfp-content .wd-popup-builder:has(.as-exit-survey-wrap) {
    max-width: 680px !important;
    margin: 20px auto !important;
}
