:root {
    --bg-color: #fbfcff;
    --card-bg: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --indigo: #4f46e5;
    --indigo-hover: #4338ca;
    --slate-light: #e2e8f0;
    --slate-hover: #cbd5e1;
    --slate-border: #e2e8f0;
    --badge-bg: #e0e7ff;
    --badge-text: #3730a3;
    --error: #ef4444;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background:
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(99, 102, 241, 0.18) 0%, rgba(99, 102, 241, 0) 60%),
        radial-gradient(ellipse 60% 40% at 100% 100%, rgba(168, 85, 247, 0.12) 0%, rgba(168, 85, 247, 0) 60%),
        radial-gradient(ellipse 60% 40% at 0% 100%, rgba(56, 189, 248, 0.10) 0%, rgba(56, 189, 248, 0) 60%),
        linear-gradient(180deg, #f8faff 0%, #eef1fb 100%);
    background-attachment: fixed;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    line-height: 1.5;
}

.container {
    width: 100%;
    max-width: 560px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.card {
    width: 100%;
    background: var(--card-bg);
    border-radius: 24px;
    padding: 48px;
    box-shadow: 0 10px 40px -10px rgba(15, 23, 42, 0.08), 0 1px 3px rgba(15, 23, 42, 0.05);
    border: 1px solid rgba(226, 232, 240, 0.6);
    position: relative;
    overflow: hidden;
}

.header-section {
    text-align: center;
    margin-bottom: 40px;
}

.badge {
    display: inline-block;
    background: var(--badge-bg);
    color: var(--badge-text);
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 6px 14px;
    border-radius: 999px;
    margin-bottom: 24px;
}

h1 {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-main);
    line-height: 1.2;
    margin-bottom: 12px;
}

.subtitle {
    font-size: 1.0625rem;
    color: var(--text-muted);
}

.nps-widget {
    margin-bottom: 0;
}

.nps-scale {
    display: flex;
    justify-content: space-between;
    gap: 6px;
    margin-bottom: 12px;
}

@media (max-width: 480px) {
    .nps-scale {
        overflow-x: auto;
        padding-bottom: 8px;
        /* Custom scrollbar for scale */
        scrollbar-width: none; 
    }
    .nps-scale::-webkit-scrollbar {
        display: none;
    }
    .nps-scale {
        -ms-overflow-style: none;  
    }
}

.nps-btn {
    flex: 1 1 0;
    min-width: 36px;
    height: 48px;
    border-radius: 8px;
    border: none;
    background: var(--slate-light);
    color: var(--text-main);
    font-size: 1.0625rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.nps-btn:hover {
    background: var(--slate-hover);
    transform: translateY(-1px);
}

.nps-btn.active {
    background: var(--indigo);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px -4px rgba(79, 70, 229, 0.4);
}

.nps-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* Progressive reveal for follow-up */
.follow-up {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.6s cubic-bezier(0.4, 0, 0.2, 1), 
                opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
                margin-top 0.4s ease;
    margin-top: 0;
}

.follow-up.visible {
    max-height: 600px;
    opacity: 1;
    margin-top: 40px;
    overflow: visible; /* Allows focus rings to show correctly */
}

.form-group {
    margin-bottom: 24px;
    text-align: left;
}

label {
    display: block;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-main);
    margin-bottom: 8px;
}

textarea, input[type="email"] {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--slate-border);
    border-radius: 12px;
    background: #ffffff;
    font-family: inherit;
    font-size: 1rem;
    color: var(--text-main);
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}

textarea::placeholder, input[type="email"]::placeholder {
    color: #94a3b8;
}

textarea:focus, input[type="email"]:focus {
    outline: none;
    border-color: var(--indigo);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

.submit-btn {
    width: 100%;
    padding: 16px;
    background: var(--indigo);
    color: #ffffff;
    font-weight: 600;
    font-size: 1rem;
    font-family: inherit;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.submit-btn:hover {
    background: var(--indigo-hover);
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.25);
}

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

.spinner {
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
}

.opacity-25 { opacity: 0.25; }
.opacity-75 { opacity: 0.75; }

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

.error-alert {
    background: #fef2f2;
    color: #b91c1c;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.875rem;
    margin-bottom: 20px;
    border-left: 4px solid #ef4444;
}

.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.success-icon {
    width: 64px;
    height: 64px;
    color: var(--indigo);
    margin: 0 auto 24px;
}

.footer-microcopy {
    margin-top: 32px;
    font-size: 0.8125rem;
    color: var(--text-muted);
    text-align: center;
}

#wbx-powered-by-slot {
    margin-top: 24px;
    width: 100%;
}

@media (max-width: 600px) {
    .card {
        padding: 32px 24px;
        border-radius: 20px;
    }
    h1 {
        font-size: 1.5rem;
    }
}