/* ==================== Form Page Styles ==================== */

.form-container {
    min-height: 100vh;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    padding: 2rem 0;
    display: flex;
    justify-content: center;
}

.form-wrapper {
    max-width: 700px;
    width: 100%;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 6px;
    background-color: var(--border-color);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--python-yellow) 0%, var(--python-yellow-dark) 100%);
    transition: width 0.4s ease;
    width: 14.28%; /* 1/7 sections */
}

.progress-text {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
}

.progress-text.hidden {
    display: none;
}

/* Form Sections */
#customizeForm {
    background-color: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 1.75rem 2rem;
    box-shadow: var(--shadow-lg);
    margin-bottom: 1rem;
    min-height: 380px;
}

.form-section {
    display: none;
    animation: fadeInForm 0.4s ease;
}

.form-section.active {
    display: block;
}

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

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

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

.form-section h2 {
    font-size: 1.5rem;
    color: var(--black);
    margin-bottom: 0.75rem;
    font-weight: 700;
}

.section-description {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    margin-bottom: 1.25rem;
    line-height: 1.5;
}

.section-subtitle-spacing {
    margin-top: 1.75rem;
}

/* Options Grid */
.options-grid {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-width: 500px;
}

.checkbox-grid {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-width: 500px;
}

/* Option Cards */
.option-card {
    position: relative;
    cursor: pointer;
    border-radius: 8px;
    border: 2px solid var(--border-color);
    background-color: var(--bg-primary);
    transition: all 0.15s ease;
    overflow: hidden;
}

.option-card:hover {
    border-color: var(--python-yellow);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.option-card input[type="radio"],
.option-card input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.option-card input:checked + .option-content {
    border-left: 3px solid var(--python-yellow);
}

.option-card input:checked + .option-content .option-letter {
    background-color: var(--python-yellow);
    color: var(--black);
    font-weight: 700;
}

.option-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 1rem;
    transition: all 0.15s ease;
}

.option-letter {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background-color: var(--bg-secondary);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
    flex-shrink: 0;
    transition: all 0.15s ease;
}

.option-label {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-primary);
}

/* Email Input */
.email-input-wrapper {
    max-width: 500px;
    margin: 0;
}

.email-input {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.9375rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--bg-primary);
    transition: all 0.15s ease;
    font-family: var(--font-primary);
}

.email-input:focus {
    outline: none;
    border-color: var(--python-yellow);
    box-shadow: 0 0 0 3px rgba(244, 180, 0, 0.1);
}

/* Pricing Selection */
.pricing-section {
    min-height: 450px;
}

.pricing-section #customizeForm {
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
}

.pricing-selection {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 1.5rem;
}

.pricing-option {
    cursor: pointer;
}

.pricing-option input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.pricing-option-card {
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 1.25rem 1rem;
    background-color: var(--bg-primary);
    transition: all 0.15s ease;
    height: 100%;
    position: relative;
}

.pricing-option:hover .pricing-option-card {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.pricing-option input:checked + .pricing-option-card {
    border-color: var(--python-yellow);
    border-width: 2px;
    box-shadow: 0 2px 4px rgba(244, 180, 0, 0.2);
}

.pricing-option.featured .pricing-option-card {
    border-color: var(--python-yellow);
}

.pricing-option-card h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: var(--black);
    font-weight: 700;
}

.pricing-option-card .price {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--black);
    margin: 0.5rem 0;
}

.plan-features {
    list-style: none;
    margin-top: 0.75rem;
}

.plan-features li {
    padding: 0.3rem 0;
    color: var(--text-secondary);
    font-size: 0.8125rem;
}

.plan-features li:before {
    content: "✓ ";
    color: #22c55e;
    font-weight: 700;
    margin-right: 0.4rem;
}

/* Form Navigation */
.form-navigation {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.nav-btn {
    flex: 1;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: var(--font-primary);
}

.nav-btn-primary {
    background-color: var(--python-yellow);
    color: var(--black);
}

.nav-btn-primary:hover {
    background-color: var(--python-yellow-dark);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.nav-btn-secondary {
    background-color: transparent;
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.nav-btn-secondary:hover {
    border-color: var(--text-primary);
    background-color: rgba(0, 0, 0, 0.02);
}

.nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.nav-btn-primary.auto-advancing {
    animation: pulse 0.8s ease-in-out;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: var(--shadow-sm);
    }
    50% {
        transform: scale(1.05);
        box-shadow: var(--shadow-md);
    }
}

/* Conditional Section */
.conditional-section {
    animation: expandDown 0.3s ease;
}

@keyframes expandDown {
    from {
        opacity: 0;
        max-height: 0;
    }
    to {
        opacity: 1;
        max-height: 500px;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .form-container {
        padding: 1rem 0;
    }

    #customizeForm {
        padding: 1.5rem 1.25rem;
        min-height: 350px;
    }

    .form-section h2 {
        font-size: 1.375rem;
    }

    .options-grid {
        gap: 0.5rem;
    }

    .option-content {
        padding: 0.6rem 0.875rem;
    }

    .pricing-selection {
        grid-template-columns: 1fr;
    }

    .form-navigation {
        flex-direction: column-reverse;
    }

    .nav-btn {
        width: 100%;
    }

    /* Responsive disclaimer */
    .replacement-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .replacement-label {
        min-width: auto;
    }

    .replacement-arrow {
        display: none;
    }

    .replacement-item > span:not(.replacement-label) {
        padding-left: 1rem;
    }
}

/* Loading State */
.form-loading {
    display: none;
    text-align: center;
    padding: var(--spacing-lg);
}

.form-loading.active {
    display: block;
}

.spinner {
    border: 3px solid var(--border-color);
    border-top: 3px solid var(--python-yellow);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto var(--spacing-md);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Start Over Button */
.start-over-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 0.875rem;
    cursor: pointer;
    padding: 0.5rem;
    transition: color 0.15s ease;
    text-decoration: underline;
}

.start-over-btn:hover {
    color: var(--text-primary);
}

/* Replacements Disclaimer */
#replacementsDisclaimer {
    background-color: #fffbf0;
    border: 2px solid #ffd966;
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

#replacementsDisclaimer h3 {
    font-size: 1rem;
    color: var(--black);
    margin-bottom: 0.75rem;
    font-weight: 700;
}

#replacementsDisclaimer p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    margin-bottom: 1rem;
}

.replacements-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.replacement-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9375rem;
}

.replacement-label {
    font-weight: 600;
    color: var(--text-primary);
    min-width: 140px;
}

.replacement-old {
    color: #dc2626;
    text-decoration: line-through;
    font-weight: 500;
}

.replacement-arrow {
    color: var(--text-secondary);
    font-weight: 600;
}

.replacement-new {
    color: #16a34a;
    font-weight: 600;
}

.disclaimer-proceed {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-top: 0.5rem;
}