/* ===================================
   Inscripción Form Styles
   =================================== */

.inscripcion-main {
    padding: 120px 0 80px;
    min-height: 100vh;
    background: var(--bg-gray);
}

/* Progress Bar */
.form-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 700px;
    margin: 0 auto 48px;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
}

.step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--border);
    color: var(--text-muted);
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    transition: var(--transition);
}

.progress-step.active .step-circle,
.progress-step.completed .step-circle {
    background: var(--primary);
    color: white;
}

.progress-step.completed .step-circle {
    background: var(--success);
}

.step-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    white-space: nowrap;
}

.progress-step.active .step-label {
    color: var(--primary);
}

.progress-step.completed .step-label {
    color: var(--success);
}

.progress-line {
    flex: 1;
    height: 2px;
    background: var(--border);
    margin: 0 12px;
    margin-bottom: 24px;
}

/* Form Steps */
.form-step {
    display: none;
    background: white;
    border-radius: var(--radius-xl);
    padding: 48px;
    box-shadow: var(--shadow);
    max-width: 800px;
    margin: 0 auto;
}

.form-step.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.step-header {
    margin-bottom: 32px;
}

.step-header h2 {
    margin-bottom: 8px;
}

.step-header p {
    font-size: 1rem;
}

/* Form Grid */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-grid .full-width {
    grid-column: 1 / -1;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text);
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text);
}

.required {
    color: #ef4444;
}

.form-group input,
.form-group select {
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
    font-family: inherit;
    color: var(--text);
    transition: var(--transition);
    background: white;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(74, 111, 165, 0.1);
}

.form-group input.error,
.form-group select.error {
    border-color: #ef4444;
}

.field-error {
    font-size: 0.75rem;
    color: #ef4444;
    min-height: 16px;
}

/* Form Actions */
.form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

/* Mode Selector */
.mode-selector {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.mode-option {
    flex: 1;
    min-width: 180px;
    cursor: pointer;
}

.mode-option input {
    display: none;
}

.mode-label {
    display: block;
    padding: 16px 20px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    text-align: center;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-light);
    transition: var(--transition);
}

.mode-option input:checked + .mode-label {
    border-color: var(--primary);
    background: rgba(74, 111, 165, 0.05);
    color: var(--primary);
}

.mode-label:hover {
    border-color: var(--primary-light);
}

/* Quick Mode Toggle */
.quick-mode-toggle {
    margin-bottom: 24px;
    padding: 16px;
    background: var(--bg-gray);
    border-radius: var(--radius);
}

.toggle-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
}

.toggle-label input {
    display: none;
}

.toggle-switch {
    width: 44px;
    height: 24px;
    background: var(--border);
    border-radius: 12px;
    position: relative;
    transition: var(--transition);
    flex-shrink: 0;
}

.toggle-switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: var(--transition);
}

.toggle-label input:checked + .toggle-switch {
    background: var(--primary);
}

.toggle-label input:checked + .toggle-switch::after {
    left: 22px;
}

.course-availability-note {
    padding: 12px 16px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: var(--radius);
    font-size: 0.8125rem;
    color: #1e40af;
    line-height: 1.5;
    margin-bottom: 16px;
}

.quick-mode-warning {
    margin-top: 8px;
    padding: 12px 16px;
    background: #fef3c7;
    border-radius: var(--radius);
    font-size: 0.8125rem;
    color: #92400e;
    line-height: 1.5;
}

/* Quick mode extra inputs */
.quick-extra-section {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 16px;
}

.quick-extra-section h4 {
    font-size: 0.9375rem;
    margin-bottom: 6px;
    color: var(--text);
}

.quick-extra-hint {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.quick-extra-section textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-family: monospace;
    font-size: 0.8125rem;
    line-height: 1.6;
    resize: vertical;
    transition: border-color 0.2s;
}

.quick-extra-section textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.file-upload-area {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.file-upload-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-light);
    transition: border-color 0.2s, color 0.2s;
}

.file-upload-label:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.file-upload-name {
    font-size: 0.8125rem;
    color: var(--primary);
    font-weight: 600;
}

/* Participant Card */
.participant-card {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 16px;
    position: relative;
    background: var(--bg-gray);
}

.participant-card.self-participant {
    border-color: var(--primary-light);
    background: rgba(74, 111, 165, 0.03);
}

.participant-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.participant-header h4 {
    font-size: 0.9375rem;
    color: var(--primary);
}

.btn-remove-participant {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px 8px;
    font-size: 0.8125rem;
    transition: var(--transition);
}

.btn-remove-participant:hover {
    color: #ef4444;
}

.participant-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.participant-fields .form-group.full-width {
    grid-column: 1 / -1;
}

/* Quick Entry Card */
.quick-entry-card {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    margin-bottom: 12px;
    background: var(--bg-gray);
    display: flex;
    align-items: center;
    gap: 16px;
}

.quick-entry-card .form-group {
    flex: 1;
    margin: 0;
}

.quick-entry-card .form-group.qty-group {
    max-width: 100px;
}

.quick-entry-card .btn-remove-participant {
    flex-shrink: 0;
}

/* Add Participant Button */
.btn-add-participant {
    width: 100%;
    margin-bottom: 24px;
    border-style: dashed;
}

/* Order Total */
.order-total {
    background: var(--bg-gray);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 8px;
}

.total-line {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 0.9375rem;
    color: var(--text-light);
}

.total-final {
    border-top: 2px solid var(--border);
    margin-top: 8px;
    padding-top: 16px;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
}

/* Review Section */
.review-section {
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
}

.review-section:last-of-type {
    border-bottom: none;
}

.review-section h3 {
    margin-bottom: 16px;
    font-size: 1.125rem;
    color: var(--primary);
}

.review-note {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.review-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.review-item {
    padding: 8px 0;
}

.review-item .review-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.review-item .review-value {
    font-weight: 600;
    color: var(--text);
}

.review-participant {
    background: var(--bg-gray);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 8px;
}

.review-participant h4 {
    font-size: 0.875rem;
    color: var(--primary);
    margin-bottom: 8px;
}

.review-participant p {
    font-size: 0.875rem;
    margin-bottom: 4px;
}

.review-total-box {
    background: var(--primary);
    color: white;
    border-radius: var(--radius-lg);
    padding: 24px;
    text-align: center;
}

.review-total-box .total-label {
    font-size: 0.875rem;
    opacity: 0.8;
    margin-bottom: 4px;
}

.review-total-box .total-value {
    font-size: 2rem;
    font-weight: 800;
}

/* Confirmation */
.confirmation-content {
    text-align: center;
    padding: 40px 20px;
}

.confirmation-icon {
    width: 80px;
    height: 80px;
    background: rgba(16, 185, 129, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
}

.confirmation-icon svg {
    width: 40px;
    height: 40px;
    color: var(--success);
}

.confirmation-content h2 {
    margin-bottom: 12px;
}

.confirmation-message {
    font-size: 1.125rem;
    margin-bottom: 32px;
}

.order-number-box {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: var(--bg-gray);
    border: 2px dashed var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin: 0 auto 24px;
    max-width: 400px;
}

.order-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    font-weight: 600;
}

.order-number {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    font-family: monospace;
}

.confirmation-note {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 32px;
}

.confirmation-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
}

/* Submit button loading state */
.btn-submit.loading {
    pointer-events: none;
    opacity: 0.7;
}

.btn-submit.loading::after {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin-left: 8px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Error banner */
.form-error-banner {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: var(--radius);
    padding: 12px 16px;
    margin-bottom: 20px;
    color: #991b1b;
    font-size: 0.875rem;
    display: none;
}

.form-error-banner.visible {
    display: block;
}

/* Responsive */
@media (max-width: 768px) {
    .inscripcion-main {
        padding: 100px 0 60px;
    }

    .form-step {
        padding: 24px;
    }

    .form-grid,
    .participant-fields,
    .review-grid {
        grid-template-columns: 1fr;
    }

    .mode-selector {
        flex-direction: column;
    }

    .mode-option {
        min-width: 100%;
    }

    .quick-entry-card {
        flex-direction: column;
        align-items: stretch;
    }

    .quick-entry-card .form-group.qty-group {
        max-width: 100%;
    }

    .form-progress {
        gap: 0;
    }

    .step-label {
        display: none;
    }

    .progress-line {
        margin: 0 8px;
        margin-bottom: 0;
    }

    .confirmation-actions {
        flex-direction: column;
    }

    .form-actions {
        flex-direction: column-reverse;
        gap: 12px;
    }

    .form-actions .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .form-step {
        padding: 20px 16px;
    }

    .participant-card {
        padding: 16px;
    }
}
