/* Signup Page Specific Styles */

/* Signup page wrapper - needed since body styles are in common */
.signup-page-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.signup-container {
    max-width: 550px;
}

.signup-header {
    /* Inherits from .auth-header */
    padding: 20px;
}

.signup-header h1 {
    font-size: 24px;
    margin-bottom: 8px;
}

.signup-header p {
    line-height: 1.4;
}

.signup-form {
    /* Inherits from .auth-form */
    padding: 20px 25px;
}

.is-hidden {
    display: none !important;
}

/* Form sections */
.form-section {
    margin-bottom: 20px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--warm-200);
}

.form-section.is-hidden {
    display: none;
}

.form-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.section-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--navy);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.section-title svg {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    color: var(--green);
}

.section-help {
    font-size: 14px;
    color: var(--warm-500);
    margin: -10px 0 15px 0;
    line-height: 1.5;
}

/* Form rows for side-by-side inputs */
.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.form-group.half {
    flex: 1;
    margin-bottom: 0;
}

/* Override common form-group for signup */
.signup-form .form-group {
    margin-bottom: 15px;
}

.signup-form .form-group input {
    padding: 10px 12px;
}

/* Company search specific styles */
.search-box {
    position: relative;
}

.search-box.hidden {
    display: none;
}

.search-input {
    width: 100%;
    padding: 10px 15px 10px 42px !important;
    border: 2px solid var(--warm-200);
    border-radius: 8px;
    font-size: 15px;
    text-indent: 0;
}

.search-input::placeholder {
    padding-left: 5px;
}

.search-input:focus {
    outline: none;
    border-color: var(--green);
    box-shadow: 0 0 0 3px rgba(17, 185, 129, 0.1);
}

.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--warm-500);
    width: 18px;
    height: 18px;
    pointer-events: none;
    z-index: 1;
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-white);
    border: 2px solid var(--warm-200);
    border-top: none;
    border-radius: 0 0 8px 8px;
    max-height: 300px;
    overflow-y: auto;
    display: none;
    z-index: 100;
    box-shadow: var(--shadow-md);
}

.search-results.active {
    display: block;
}

.company-result {
    padding: 12px;
    cursor: pointer;
    border-bottom: 1px solid var(--warm-100);
    transition: background 0.2s;
}

.company-result:hover {
    background: var(--warm-50);
}

.company-result.selected {
    background: var(--primary-50);
}

.company-name {
    font-weight: 600;
    color: var(--navy);
    font-size: 14px;
}

.company-details {
    font-size: 12px;
    color: var(--warm-500);
    margin-top: 4px;
}

/* Selected company display */
.selected-company {
    background: var(--primary-50);
    border: 1px solid var(--primary-300);
    border-radius: 8px;
    padding: 14px;
    margin-top: 12px;
    display: none;
    position: relative;
    animation: fadeIn 0.3s ease;
}

.selected-company.active {
    display: block;
}

/* Terms and conditions */
.terms-group {
    padding: 0 !important;
    margin-bottom: 0 !important;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    border: none !important;
}

/* Override generic form-group input styles for checkbox */
.terms-group .terms-checkbox {
    width: 18px !important;
    height: 18px !important;
    margin: 0 !important;
    margin-top: 2px !important;  /* Align with first line of text */
    padding: 0 !important;
    cursor: pointer;
    flex-shrink: 0;
    accent-color: var(--green);
    border-radius: 4px;
}

.terms-label {
    margin: 0;
    padding: 0;
    font-size: 14px;
    color: var(--warm-700);
    cursor: pointer;
    line-height: 1.5;
    flex: 1;
    display: block;
}

.terms-link {
    color: var(--green);
    text-decoration: none;
}

.terms-link:hover {
    text-decoration: underline;
}

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

.selected-company-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn-remove {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--warm-100);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--warm-500);
    padding: 0;
    flex-shrink: 0;
}

.btn-remove:hover {
    background: var(--warm-200);
    color: var(--warm-700);
    transform: scale(1.1);
}

.btn-remove svg {
    width: 14px;
    height: 14px;
}

/* Password requirements */
.password-requirements {
    font-size: 12px;
    color: var(--warm-500);
    margin-top: 5px;
}

/* Radio button groups */
.radio-group-inline {
    display: flex;
    gap: 12px;
}

.radio-option-compact {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 16px;
    border: 2px solid var(--warm-200);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--bg-white);
    flex: 1;
    text-align: center;
}

.radio-option-compact:hover {
    border-color: var(--green);
    background: var(--primary-50);
}

.radio-option-compact input[type="radio"] {
    margin-right: 8px;
    cursor: pointer;
    flex-shrink: 0;
}

.radio-option-compact:has(input[type="radio"]:checked) {
    border-color: var(--green);
    background: var(--primary-50);
}

.radio-label-compact {
    font-weight: 500;
    color: var(--warm-700);
    font-size: 14px;
}

.radio-option-compact:has(input[type="radio"]:checked) .radio-label-compact {
    color: var(--primary-800);
    font-weight: 600;
}

/* Radio button group - stacked (for business type selection) */
.radio-group-stacked {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.radio-option {
    display: flex;
    align-items: flex-start;
    padding: 14px;
    border: 2px solid var(--warm-200);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--bg-white);
}

.radio-option:hover {
    border-color: var(--green);
    background: var(--primary-50);
}

.radio-option input[type="radio"] {
    margin-top: 2px;
    margin-right: 12px;
    cursor: pointer;
    flex-shrink: 0;
}

.radio-option:has(input[type="radio"]:checked) {
    border-color: var(--green);
    background: var(--primary-50);
}

.radio-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.radio-label {
    font-weight: 600;
    color: var(--warm-700);
    font-size: 14px;
}

.radio-description {
    font-size: 12px;
    color: var(--warm-500);
    font-weight: 400;
}

.radio-option:has(input[type="radio"]:checked) .radio-label {
    color: var(--primary-800);
}

.radio-option:has(input[type="radio"]:checked) .radio-description {
    color: var(--primary-700);
}

/* Signup button */
.btn-signup {
    /* Inherits from .btn-primary */
    margin-top: 10px;
}

/* Loading spinner */
.loading-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid var(--warm-200);
    border-top-color: var(--green);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-left: 8px;
}

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

.search-feedback {
    padding: 15px;
    text-align: center;
    color: var(--warm-500);
}

.search-feedback.error {
    color: var(--error);
}

/* Success Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: modalFadeIn 0.3s ease;
}

.modal-overlay.is-hidden {
    display: none;
}

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

.success-modal {
    background: var(--bg-white);
    border-radius: 20px;
    padding: 40px;
    max-width: 500px;
    width: 90%;
    box-shadow: var(--shadow-xl);
    text-align: center;
    animation: slideUp 0.3s ease;
}

.success-highlight {
    background: var(--primary-50);
    border: 1px solid var(--primary-300);
    border-radius: 8px;
    padding: 16px;
    margin: 20px 0;
}

.success-highlight-text {
    margin: 0;
    color: var(--primary-800);
    font-weight: 600;
    text-align: center;
}

.success-instructions {
    color: var(--warm-700);
    margin: 20px 0;
    text-align: center;
}

.success-note {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--warm-200);
    color: var(--warm-500);
    font-size: 14px;
}

.support-link {
    color: var(--green);
    text-decoration: none;
}

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

.modal-icon {
    margin-bottom: 20px;
}

.success-modal h2 {
    color: var(--green);
    font-size: 24px;
    margin-bottom: 15px;
}

.modal-message {
    font-size: 16px;
    color: var(--warm-700);
    margin-bottom: 25px;
    line-height: 1.5;
}

.modal-actions {
    display: flex;
    justify-content: center;
    margin-bottom: 15px;
}

.modal-note {
    font-size: 13px;
    color: var(--warm-500);
    margin: 0;
}

/* Validation Messages (from submission-form.css for consistency) */
.sf-validation {
    display: block;
    background: var(--error-bg);
    border: 1px solid var(--error-border);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.sf-validation:not(.is-hidden) {
    display: block;
}

.sf-validation__body {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.sf-validation__icon {
    width: 20px;
    height: 20px;
    color: var(--error);
    flex-shrink: 0;
    margin-top: 2px;
}

.sf-validation__content {
    flex: 1;
}

.sf-validation__title {
    margin: 0 0 0.5rem 0;
    color: var(--error-dark);
    font-size: 1rem;
    font-weight: 600;
}

.sf-validation__list {
    margin: 0;
    padding-left: 1.25rem;
    color: var(--error-dark);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Entity Type Selector (styled like filing-type-options) */
.filing-type-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 0.75rem;
}

.filing-type-option {
    cursor: pointer;
    display: block;
}

.filing-type-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.filing-type-option-card {
    background: var(--bg-white);
    border: 2px solid var(--warm-200);
    border-radius: 8px;
    padding: 1rem 0.75rem;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    min-height: 90px;
    justify-content: center;
}

.filing-type-option:hover .filing-type-option-card {
    border-color: var(--green);
    background: var(--primary-50);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(17, 185, 129, 0.15);
}

.filing-type-option input[type="radio"]:checked + .filing-type-option-card {
    border-color: var(--green);
    background: var(--primary-50);
    box-shadow: 0 0 0 3px rgba(17, 185, 129, 0.1);
}

.filing-type-icon {
    width: 32px;
    height: 32px;
    color: var(--green);
    stroke-width: 2;
}

.filing-type-label {
    font-weight: 500;
    font-size: 0.9375rem;
    color: var(--navy);
}

/* Responsive: Stack options on mobile */
@media (max-width: 768px) {
    .filing-type-options {
        grid-template-columns: 1fr;
    }

    .filing-type-option-card {
        flex-direction: row;
        justify-content: flex-start;
        padding: 1rem 1.5rem;
        min-height: auto;
    }

    .filing-type-icon {
        width: 24px;
        height: 24px;
    }

    .filing-type-label {
        text-align: left;
    }
}
