/* ==========================================================================
   SIGNUP FLOW STYLES
   Contains: Sidebar, Grid Layout, Initial Forms, Testimonials
   ========================================================================== */

/* Background */
.signup-bg-overlay {
    position: absolute;
    inset: 0;
    opacity: 0.8;
    z-index: -10;
    background-size: cover;
    background-position: 50%;
    background-repeat: no-repeat;
}

/* Toast Container */
.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 50;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Layout */
.signup-wrapper {
    min-height: 100vh;
}

.signup-bg-grid {
    display: none;
    position: fixed;
    inset: 0;
    grid-template-columns: 2fr 3fr;
    height: 100vh;
}

@media (min-width: 1024px) {
    .signup-bg-grid {
        display: grid;
    }
}

.signup-bg-left {
    background-color: #f1f5f9;
}

.signup-bg-right {
    background-color: #ffffff;
}

.signup-main-grid {
    display: grid;
    grid-template-columns: 1fr;
    min-height: 100vh;
    max-width: 72rem;
    margin: 0 auto;
    position: relative;
}

@media (min-width: 768px) {
    .signup-main-grid {
        grid-template-columns: 2fr 3fr;
    }
}

/* Sidebar */
.signup-sidebar {
    background-color: #f1f5f9;
    padding: 3rem 1.5rem;
    order: 1;
}

@media (min-width: 768px) {
    .signup-sidebar {
        padding: 2.5rem 4rem 2.5rem 3.25rem;
        order: 0;
    }
}

.signup-back-link {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-weight: 500;
    font-size: 0.875rem;
    text-decoration: none;
    color: inherit;
    position: absolute;
    top: 1.25rem;
    left: 1.25rem;
    right: 1.25rem;
    height: 2.5rem;
    min-width: 12rem;
    max-width: fit-content;
    margin-bottom: 2rem;
}

@media (min-width: 768px) {
    .signup-back-link {
        position: relative;
        top: auto;
        left: auto;
        right: auto;
        margin-left: -1.5rem;
    }
}

.signup-back-link:hover {
    color: #6366f1;
}

.back-arrow {
    opacity: 0.4;
    font-size: 1rem;
    transition: all 0.15s;
}

.signup-back-link:hover .back-arrow {
    margin-left: -0.125rem;
    opacity: 1;
}

.signup-logo {
    background-color: #6366f1;
    width: 1.75rem;
    height: 1.75rem;
    padding: 0.25rem;
    border-radius: 9999px;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.signup-back-link:hover .signup-logo {
    display: none;
}

.company-name {
    opacity: 0.6;
}

.signup-back-link:hover .company-name {
    display: none;
}

.back-text {
    display: none;
    margin-left: 0.25rem;
}

.signup-back-link:hover .back-text {
    display: block;
}

.features-title {
    margin-top: 3rem;
    font-size: 1.125rem;
    font-weight: 700;
    color: #1f2937;
}

.features-list {
    margin-top: 1rem;
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 0.875rem;
    color: #1f2937;
}

.feature-check {
    color: #6366f1;
}

/* Testimonials */
.testimonial-slider {
    width: 100%;
    text-align: center;
    margin: 3rem auto 0;
}

.testimonial-image-wrapper {
    position: relative;
    height: 8rem;
}

.testimonial-image-container {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    aspect-ratio: 1;
    pointer-events: none;
}

.testimonial-image-container::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(203, 213, 225, 0.5), rgba(203, 213, 225, 0.05) 25%, rgba(99, 102, 241, 0) 75%);
    border-radius: 9999px;
    z-index: -10;
}

.testimonial-content-wrapper {
    margin: -1rem 0.5rem 1.5rem;
}

.testimonial-content {
    position: relative;
    display: flex;
    flex-direction: column;
    transition: all 150ms ease-in-out;
    transition-delay: 300ms;
    min-height: 150px;
}

.testimonial-dots {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin: -0.375rem;
}

/* Stacked testimonials styling */
.testimonials-stack {
    margin-top: 2rem;
}

.testimonial-item {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.testimonial-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.testimonial-image {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 0.75rem;
}

.testimonial-quote {
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 0.75rem;
}

.testimonial-author {
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.testimonial-role {
    font-size: 0.8rem;
}

/* Content Area */
.signup-content {
    background-color: #ffffff;
    padding: 5rem 1.5rem 4rem;
}

@media (min-width: 768px) {
    .signup-content {
        padding: 1.25rem 2.5rem 1.25rem 4rem;
    }
}

.step-label {
    display: none;
    font-size: 0.75rem;
    color: #6b7280;
    font-weight: 600;
    margin-top: 1rem;
}

@media (min-width: 768px) {
    .step-label {
        display: block;
    }
}

.progress-bar-wrapper {
    background-color: #f1f5f9;
    border-radius: 0.375rem;
    overflow: hidden;
    width: 8rem;
    position: absolute;
    top: 2.375rem;
    right: 1.5rem;
    margin-top: 0.375rem;
    margin-bottom: 2.25rem;
}

@media (min-width: 768px) {
    .progress-bar-wrapper {
        position: relative;
        top: auto;
        right: auto;
        width: 100%;
    }
}

.progress-bar {
    background-color: #6366f1;
    border-radius: 9999px;
    height: 0.375rem;
    transition: all 150ms;
}

.progress-bar-step-1 {
    width: 33%;
}

.step-counter {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 0.5rem;
}

.step-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
}

.step-subtitle {
    color: #6b7280;
    font-weight: 500;
    margin-top: 0.5rem;
    margin-bottom: 1.5rem;
}

/* Form Errors */
.form-errors {
    margin-bottom: 1.5rem;
    border: 1px solid #fecaca;
    border-radius: 0.75rem;
    padding: 1.5rem;
    background-color: rgba(254, 242, 242, 0.5);
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.error-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #991b1b;
    margin-bottom: 0.5rem;
}

.error-list {
    font-size: 0.875rem;
    color: #b91c1c;
    list-style: disc inside;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

/* Form */
.signup-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.25rem;
}

.form-label-hint {
    color: #6b7280;
    font-weight: 400;
}

.required {
    color: #ef4444;
}

.form-row-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.form-input, .form-select {
    width: 100%;
    padding: 0.625rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    transition: all 150ms;
}

.form-input:focus, .form-select:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-hint {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

.field-error {
    font-size: 0.75rem;
    color: #dc2626;
    margin-top: 0.25rem;
    display: block;
}

/* Plan Options (Initial Signup Selection) */
.plan-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.plan-option {
    cursor: pointer;
    transition: all 150ms;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: flex-start;
    background-color: #ffffff;
    border: 2px solid #e5e7eb;
    border-radius: 0.5rem;
}

.plan-option:hover {
    background-color: rgba(238, 242, 255, 0.5);
}

.plan-option:has(.plan-radio:checked) {
    border-color: #6366f1;
    background-color: rgba(238, 242, 255, 0.75);
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.plan-radio {
    margin-top: 0.25rem;
    margin-right: 0.75rem;
    width: 1.25rem;
    height: 1.25rem;
    accent-color: #6366f1;
}

.plan-content {
    flex: 1;
}

.plan-name {
    font-weight: 600;
    font-size: 1rem;
    color: #1f2937;
}

.plan-description {
    font-size: 0.875rem;
    color: #4b5563;
    margin-top: 0.25rem;
}

/* Checkbox */
.form-group-checkbox {
    display: flex;
    align-items: flex-start;
}

.form-checkbox {
    margin-top: 0.25rem;
    margin-right: 0.75rem;
    width: 1rem;
    height: 1rem;
    accent-color: #6366f1;
    border: 1px solid #d1d5db;
    border-radius: 0.25rem;
}

.checkbox-label {
    font-size: 0.875rem;
    color: #374151;
}

.link {
    color: #6366f1;
    text-decoration: none;
}

.link:hover {
    color: #4f46e5;
}

/* Buttons */
.btn {
    padding: 0.75rem 1rem;
    text-align: center;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 0.375rem;
    transition: all 150ms;
    cursor: pointer;
    border: none;
    border-bottom: 2px solid;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    text-decoration: none;
    display: inline-block;
}

.btn:disabled {
    opacity: 0.5;
    pointer-events: none;
}

.btn-primary {
    color: #ffffff;
    background-color: #6366f1;
    border-color: #4f46e5;
}

.btn-primary:hover {
    opacity: 0.9;
}

.btn-primary:active {
    opacity: 1;
}

.btn-block {
    width: 100%;
    display: block;
}

.form-submit {
    padding-top: 0.5rem;
}

.form-footer {
    text-align: center;
    font-size: 0.875rem;
    color: #4b5563;
    margin-top: 1.5rem;
}

/* Success */
.success-image {
    text-align: center;
    margin: 1.5rem 0;
}

.success-gif {
    width: 100%;
    border-radius: 0.75rem;
    pointer-events: none;
}

.success-notice {
    border: 1px solid #cbd5e1;
    border-radius: 0.75rem;
    padding: 1.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    background-color: rgba(248, 250, 252, 0.5);
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.success-action {
    margin-top: 1.5rem;
}


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

@keyframes spinnerDash {
    0% {
        stroke-dasharray: 1, 150;
        stroke-dashoffset: 0;
    }
    50% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -35;
    }
    100% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -124;
    }
}

/* SVG Spinner (.spinner) */
.spinner {
    animation: spin 1s linear infinite;
}

.spinner .path {
    stroke: #5D5FEF;
    stroke-linecap: round;
    animation: spinnerDash 1.5s ease-in-out infinite;
}

/* Border Spinner (.loader-spinner) */
.loader-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #5667e7;
    border-right: 4px solid #5667e7;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

/* Container Wrapper */
.loader-container {
    border-color: rgb(227 232 238 / var(--tw-border-opacity));
    min-width: 100%;
    min-height: 400px;
    background-color: rgb(255 255 255 / var(--tw-bg-opacity));
    display: flex;
    justify-content: center;
    align-items: center;
}

.loader-container .loader-spinner {
    width: 40px;
    height: 40px;
}

.validation-status {
    display: flex;
    align-items: center;
    gap: 0.75rem; /* Space between spinner and text */
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: #6366f1; /* Using your brand purple/indigo */
    font-weight: 500;
}

/* Override the default "0 auto" margin for this specific use case */
.validation-status .loader-spinner {
    margin: 0;
    width: 16px;
    height: 16px;
    border-width: 2px;
}

.disabled {
    cursor: not-allowed;
    background-color: #e9ecef;
    color: #6c757d;
    opacity: 0.65;
    pointer-events: none;
}