/**
 * Signup Flow - Trust-Focused Professional Design
 *
 * Uses ERE burgundy brand color (#800020) with trust indicators.
 */

/* Container and Background - min-height accounts for header (80px) + footer (57px) */
.signup-container {
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8eb 100%);
    min-height: calc(100vh - 80px - 57px);
}

@media screen and (max-width: 991px) {
    .signup-container {
        min-height: calc(100vh - 60px - 57px);
    }
}

@media screen and (min-width: 992px) and (max-width: 1115px) {
    .signup-container {
        min-height: calc(100vh - 70px - 57px);
    }
}

.signup-card {
    max-width: 700px;
    border-radius: 12px;
}

.signup-title {
    color: #800020;
    font-weight: 600;
}

/* Progress Indicator */
.progress-steps {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.progress-step {
    display: flex;
    align-items: center;
    padding: 0.5rem 0.75rem;
    color: #6c757d;
    font-weight: 500;
}

.progress-step .step-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #dee2e6;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.5rem;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.progress-step.active .step-number {
    background: #800020;
    color: white;
    box-shadow: 0 2px 8px rgba(128, 0, 32, 0.3);
}

.progress-step.completed .step-number {
    background: #198754;
    color: white;
}

.progress-step.active .step-label {
    color: #800020;
    font-weight: 600;
}

.progress-step.completed .step-label {
    color: #198754;
}

.progress-step-connector {
    width: 40px;
    height: 2px;
    background: #dee2e6;
    transition: background 0.3s ease;
}

.progress-step-connector.completed {
    background: #198754;
}

/* Plan Selection Cards */
.plan-options {
    max-width: 600px;
    margin: 0 auto;
}

.plan-option {
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid #dee2e6;
    border-radius: 8px;
}

.plan-option:hover {
    border: 2px solid #800020;
    box-shadow: 0 4px 12px rgba(128, 0, 32, 0.15);
    transform: translateY(-2px);
}

.plan-option:has(input:checked) {
    border: 2px solid #800020;
    background: linear-gradient(to right, rgba(128, 0, 32, 0.03), rgba(128, 0, 32, 0.08));
}

.plan-option label {
    cursor: pointer;
    margin: 0;
}

.plan-radio {
    width: 1.5rem;
    height: 1.5rem;
    border: 2px solid #6c757d;
}

.plan-radio:checked {
    background-color: #800020;
    border-color: #800020;
}

.plan-recommended {
    position: relative;
}

.plan-badge {
    position: absolute;
    top: -10px;
    right: 20px;
    background: #198754;
    color: white;
    font-size: 0.75rem;
    padding: 2px 12px;
    border-radius: 4px;
    font-weight: 500;
}

.plan-price {
    min-width: 80px;
    white-space: nowrap;
}

/* Trust Badges */
.trust-badges {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    margin-top: 1rem;
}

.trust-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #495057;
    font-size: 0.875rem;
}

.trust-badge i {
    color: #198754;
    font-size: 1.25rem;
}

/* Form Styling */
.section-legend {
    color: #800020;
    font-weight: 600;
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

.form-control:focus,
.form-select:focus {
    border-color: #800020;
    box-shadow: 0 0 0 0.25rem rgba(128, 0, 32, 0.15);
}

.form-control.is-valid:focus,
.form-select.is-valid:focus {
    border-color: #198754;
    box-shadow: 0 0 0 0.25rem rgba(25, 135, 84, 0.25);
}

.form-control.is-invalid:focus,
.form-select.is-invalid:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25);
}

/* Fix invalid-feedback display for input-groups */
.input-group:has(.is-invalid) + .invalid-feedback {
    display: block;
}

/* Password toggle button */
.password-toggle {
    border-color: #ced4da;
}

.password-toggle:hover {
    background-color: #e9ecef;
    border-color: #ced4da;
}

.plan-summary {
    border-left: 4px solid #800020;
}

/* Button Styling */
.btn-primary {
    background-color: #800020;
    border-color: #800020;
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: #660019;
    border-color: #660019;
}

.btn-primary:disabled {
    background-color: #9c6b7a;
    border-color: #9c6b7a;
}

/* ToS Modal */
.tos-modal-header {
    background: #800020;
    color: white;
}

#tosModal .modal-body {
    max-height: 60vh;
    overflow-y: auto;
    font-size: 0.95rem;
    line-height: 1.6;
}

#tosModal .modal-body p {
    margin-bottom: 1rem;
}

#tosModal .modal-body ul,
#tosModal .modal-body ol {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

#tosModal .modal-body li {
    margin-bottom: 0.5rem;
}

/* Payment Logos */
.payment-logos {
    opacity: 0.8;
}

.payment-logos img {
    filter: grayscale(30%);
    transition: filter 0.2s ease;
}

.payment-logos img:hover {
    filter: none;
}

/* Alert styling */
#form-errors {
    position: sticky;
    top: 10px;
    z-index: 100;
}

/* Responsive Adjustments */
@media (max-width: 576px) {
    .progress-step .step-label {
        display: none;
    }

    .progress-step-connector {
        width: 20px;
    }

    .plan-option .card-body {
        flex-wrap: wrap;
    }

    .plan-option .flex-grow-1 {
        width: 100%;
        margin-bottom: 0.5rem;
    }

    .plan-price {
        margin-left: auto;
    }

    .trust-badges {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
}

/* Loading spinner for form submission */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Card input icons */
.card-input-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
}

/* Smooth transitions */
fieldset {
    transition: opacity 0.3s ease;
}

.d-none {
    display: none !important;
}

/* Focus states for accessibility */
.plan-option:focus-within {
    outline: 2px solid #800020;
    outline-offset: 2px;
}

input:focus,
select:focus,
button:focus {
    outline: none;
}

/* Badge styling */
.badge.rounded-circle {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
}

/* ToS pending state - form disabled until ToS accepted */
.tos-pending {
    opacity: 0.6;
    pointer-events: none;
}

.tos-pending::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.5);
    z-index: 10;
}
