/* ==============================================
   Beta Form Styles — beta.html
   ============================================== */

/* NPS & button variant colors */
:root {
  --nps-detractor: #ef4444;
  --nps-detractor-dark: #dc2626;
  --nps-passive: #eab308;
  --nps-passive-dark: #d97706;
  --nps-promoter: #22c55e;
  --nps-promoter-dark: #16a34a;
}

/* Progress Bar */
.progress-container {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg-primary);
    padding: var(--space-3) 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: var(--space-6);
}

.progress-bar {
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
    overflow: hidden;
    position: relative;
}

.progress-bar__fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
    border-radius: var(--radius-full);
    transition: width 0.3s ease;
    width: 0%;
}

.progress-text {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: var(--space-2);
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

.progress-text__saved {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    color: var(--color-success);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.progress-text__saved.visible {
    opacity: 1;
}

/* Checkbox Grid */
.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-2);
}

.checkbox-item {
    display: flex;
    gap: var(--space-3);
    align-items: flex-start;
    padding: var(--space-3);
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    transition: background 0.2s ease;
}

.checkbox-item:hover {
    background: var(--bg-tertiary);
}

.checkbox-item input[type="checkbox"],
.checkbox-item input[type="radio"] {
    margin-top: 3px;
    flex-shrink: 0;
}

.checkbox-item label {
    font-size: var(--text-sm);
    color: var(--text-primary);
    cursor: pointer;
    line-height: 1.4;
}

/* Radio Horizontal */
.radio-horizontal {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.radio-horizontal .checkbox-item {
    flex: 1;
    min-width: 120px;
    justify-content: center;
    text-align: center;
}

.radio-horizontal .checkbox-item label {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

/* Bug Details */
.bug-details {
    display: none;
    margin-top: var(--space-4);
    padding: var(--space-4);
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    border-left: 3px solid var(--color-warning);
}

.bug-details.visible {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Intro Card */
.intro-card {
    background: linear-gradient(135deg, var(--color-primary-light) 0%, var(--color-accent-light) 100%);
    border: 1px solid var(--color-primary);
    padding: var(--space-6);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-8);
    text-align: center;
}

[data-theme="dark"] .intro-card {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(139, 92, 246, 0.15) 100%);
}

.intro-card h2,
.intro-card h3 {
    text-align: center;
    color: var(--text-primary);
}

.intro-card h2 {
    margin-bottom: var(--space-3);
}

.intro-card h3 {
    margin-bottom: var(--space-4);
}

.intro-card p,
.intro-card ul {
    color: var(--text-secondary);
    line-height: 1.6;
    text-align: left;
}

.intro-card .time-estimate {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    margin-top: var(--space-4);
    padding: var(--space-2) var(--space-4);
    background: var(--bg-primary);
    border-radius: var(--radius-full);
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

/* Section Divider */
.section-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-color), transparent);
    margin: var(--space-8) 0;
}

/* Other Input (conditional fields) */
.other-input {
    display: none;
    margin-top: var(--space-2);
}

.other-input.visible {
    display: block;
}

/* Question Sections */
.question-section {
    scroll-margin-top: 80px;
}

.form-section-fieldset {
    border: 0;
    margin: 0;
    min-inline-size: 0;
    padding: 0;
}

.form-section-legend {
    color: var(--text-primary);
    font-size: var(--text-2xl, 1.5rem);
    font-weight: 700;
    margin-bottom: var(--space-6);
    padding: 0;
    width: 100%;
}

/* NPS Scale */
.nps-scale {
    display: flex;
    gap: var(--space-1);
    flex-wrap: wrap;
    justify-content: center;
}

.nps-scale--left {
    justify-content: flex-start;
}

.nps-scale input[type="radio"] {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.nps-scale label {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
    font-size: var(--text-sm);
}

/* NPS colors — class-based (robust, no nth-child) */
.nps-scale label.nps-detractor {
    background: color-mix(in srgb, var(--nps-detractor) 10%, transparent);
    color: var(--nps-detractor);
    border: 2px solid color-mix(in srgb, var(--nps-detractor) 30%, transparent);
}

.nps-scale label.nps-passive {
    background: color-mix(in srgb, var(--nps-passive) 10%, transparent);
    color: var(--nps-passive);
    border: 2px solid color-mix(in srgb, var(--nps-passive) 30%, transparent);
}

.nps-scale label.nps-promoter {
    background: color-mix(in srgb, var(--nps-promoter) 10%, transparent);
    color: var(--nps-promoter);
    border: 2px solid color-mix(in srgb, var(--nps-promoter) 30%, transparent);
}

.nps-scale input[type="radio"]:focus-visible + label {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

.nps-scale input[type="radio"]:checked + label {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.nps-scale input[type="radio"]:checked + label.nps-detractor {
    background: var(--nps-detractor);
    color: white;
}

.nps-scale input[type="radio"]:checked + label.nps-passive {
    background: var(--nps-passive);
    color: white;
}

.nps-scale input[type="radio"]:checked + label.nps-promoter {
    background: var(--nps-promoter);
    color: white;
}

.nps-legend {
    display: flex;
    justify-content: space-between;
    margin-top: var(--space-3);
    font-size: var(--text-xs);
    color: var(--text-muted);
}

/* Social Handles */
.social-handles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-4);
    margin-top: var(--space-4);
}

/* Big Button Style */
.big-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-3);
}

.big-buttons--single {
    grid-template-columns: 1fr;
}

.big-buttons--inline {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.big-button {
    position: relative;
}

.big-button input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.big-button label {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: var(--space-4) var(--space-5);
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    cursor: pointer;
    font-size: var(--text-base);
    font-weight: 500;
    color: var(--text-primary);
    transition: all 0.2s ease;
    min-height: 60px;
    line-height: 1.3;
}

.big-button label:hover {
    background: var(--bg-tertiary);
    border-color: var(--color-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.big-button input:focus-visible + label {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

.big-button input:checked + label {
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    border-color: transparent;
    color: white;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.3);
}

.big-button input[type="checkbox"]:checked + label {
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
}

/* Variations for different question types */
.big-button--success input:checked + label {
    background: linear-gradient(135deg, var(--nps-promoter), var(--nps-promoter-dark));
    box-shadow: 0 4px 16px color-mix(in srgb, var(--nps-promoter) 30%, transparent);
}

.big-button--danger input:checked + label {
    background: linear-gradient(135deg, var(--nps-detractor), var(--nps-detractor-dark));
    box-shadow: 0 4px 16px color-mix(in srgb, var(--nps-detractor) 30%, transparent);
}

.big-button--warning input:checked + label {
    background: linear-gradient(135deg, var(--color-warning), var(--nps-passive-dark));
    box-shadow: 0 4px 16px color-mix(in srgb, var(--color-warning) 30%, transparent);
}

/* Checkbox limit message */
.checkbox-limit-msg {
    margin-top: var(--space-3);
    padding: var(--space-2) var(--space-4);
    background: color-mix(in srgb, var(--nps-passive) 10%, transparent);
    border: 1px solid color-mix(in srgb, var(--nps-passive) 30%, transparent);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: var(--text-sm);
    display: none;
}

.checkbox-limit-msg.visible {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* Clear form button */
.clear-form-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: var(--text-sm);
    cursor: pointer;
    text-decoration: underline;
    padding: var(--space-2);
}

.clear-form-btn:hover {
    color: var(--color-error);
}

/* Testimonial hint (neutral) */
.testimonial-hint {
    margin-top: var(--space-4);
    padding: var(--space-3) var(--space-4);
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    border-left: 3px solid var(--color-accent);
    font-size: var(--text-sm);
    color: var(--text-secondary);
    font-style: italic;
}
