/**
 * ExtrumWeb Push & Email Marketing - Pop-up Styles
 */
.ew-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease-in-out;
}

.ew-popup-overlay.ew-popup-visible {
    opacity: 1;
    pointer-events: auto;
}

.ew-popup-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.ew-popup-dialog {
    position: relative;
    background: #ffffff;
    width: 100%;
    max-width: 440px;
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    z-index: 10;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    transform: scale(0.95) translateY(10px);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-sizing: border-box;
}

.ew-popup-overlay.ew-popup-visible .ew-popup-dialog {
    transform: scale(1) translateY(0);
}

.ew-popup-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #f1f5f9;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    transition: all 0.15s ease;
    z-index: 20;
}

.ew-popup-close:hover {
    background: #e2e8f0;
    color: #0f172a;
    transform: scale(1.05);
}

.ew-popup-body {
    padding: 32px 28px 24px 28px;
    box-sizing: border-box;
}

.ew-popup-header {
    text-align: center;
    margin-bottom: 20px;
}

.ew-popup-badge-icon {
    width: 52px;
    height: 52px;
    border-radius: 18px;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    margin-bottom: 12px;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.15);
}

.ew-badge-success {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.15);
}

.ew-popup-title {
    font-size: 20px;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 6px 0;
    line-height: 1.25;
}

.ew-popup-subtitle {
    font-size: 13px;
    color: #64748b;
    margin: 0;
    line-height: 1.45;
}

.ew-popup-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ew-form-field {
    display: flex !important;
    flex-direction: column !important;
    gap: 5px !important;
    text-align: left !important;
}

.ew-form-field label {
    text-align: left !important;
    float: none !important;
    display: block !important;
    width: 100% !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    color: #475569 !important;
    margin: 0 !important;
}

.ew-required {
    color: #ef4444;
}

.ew-input {
    width: 100% !important;
    padding: 11px 14px !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 12px !important;
    font-size: 14px !important;
    color: #0f172a !important;
    background: #ffffff !important;
    box-sizing: border-box !important;
    text-align: left !important;
    transition: all 0.15s ease !important;
}

.ew-input:focus {
    outline: none !important;
    border-color: #2563eb !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12) !important;
}

.ew-phone-group {
    display: flex !important;
    align-items: center !important;
    width: 100% !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 12px !important;
    background: #ffffff !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
    transition: all 0.15s ease !important;
}

.ew-phone-group:focus-within {
    border-color: #2563eb !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12) !important;
}

.ew-phone-prefix {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
    padding: 10px 12px !important;
    background: #f8fafc !important;
    border-right: 1px solid #e2e8f0 !important;
    font-size: 13px !important;
    font-weight: 800 !important;
    color: #1e293b !important;
    user-select: none !important;
    white-space: nowrap !important;
}

.ew-input-phone {
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 11px 14px !important;
    flex: 1 !important;
    width: 100% !important;
    font-size: 15px !important;
    letter-spacing: 1.5px !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    text-align: left !important;
}

.ew-input-phone:focus {
    outline: none !important;
    box-shadow: none !important;
    border: none !important;
}

.ew-form-optin {
    margin-top: 2px;
}

.ew-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 11px;
    color: #64748b;
    cursor: pointer;
    line-height: 1.35;
    text-align: left;
}

.ew-checkbox-label input {
    margin-top: 2px;
    accent-color: #2563eb;
}

.ew-alert-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
    text-align: left;
}

.ew-btn-submit {
    width: 100%;
    padding: 12px 18px;
    border-radius: 14px;
    border: none;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 4px;
}

.ew-btn-submit:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.4);
}

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

.ew-btn-spinner svg {
    animation: ew-spin 0.8s linear infinite;
}

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

.ew-popup-privacy {
    margin: 14px 0 0 0;
    font-size: 10px;
    color: #94a3b8;
    text-align: center;
    line-height: 1.35;
}

/* État Code Révélé */
.ew-code-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f8fafc;
    border: 2px dashed #cbd5e1;
    border-radius: 16px;
    padding: 8px 8px 8px 16px;
    margin: 20px 0 12px 0;
}

.ew-code-text {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: 1.5px;
    color: #1e293b;
}

.ew-btn-copy {
    padding: 8px 16px;
    background: #0f172a;
    color: #ffffff;
    border-radius: 10px;
    border: none;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
}

.ew-btn-copy:hover {
    background: #334155;
}

.ew-copied-notice {
    font-size: 11px;
    font-weight: 700;
    color: #10b981;
    margin: 0 0 12px 0;
    text-align: center;
}

.ew-btn-continue {
    width: 100%;
    padding: 12px 18px;
    border-radius: 14px;
    border: none;
    background: #10b981;
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
}

.ew-btn-continue:hover {
    background: #059669;
}

.ew-confirmed-box {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: #ecfdf5;
    border: 1.5px dashed #10b981;
    border-radius: 14px;
    padding: 16px 20px;
    margin: 18px 0;
    color: #065f46;
    font-size: 14px;
    font-weight: 700;
}

.ew-confirmed-icon {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #10b981;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 800;
    flex-shrink: 0;
}
