﻿/* Stepper container */
.stepper {
    display: flex;
    flex-wrap: wrap;
    justify-content: center; /* center steps horizontally */
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 2rem;
    container-type: inline-size;
}

/* Step items */
.step {
    display: flex;
    align-items: center;
    justify-content: center; /* keep dot + text centered */
    gap: 0.5rem;
    flex: 1 1 calc(25% - 1rem); /* wide: 4 columns */
    min-width: 140px;
    cursor: pointer;
    text-align: center;
}

    /* Step dots */
    .step .dot {
        display: inline-flex;
        justify-content: center;
        align-items: center;
        width: 32px;
        height: 32px;
        border-radius: 50%;
        border: 2px solid var(--bs-gray-400);
        background-color: white;
        color: var(--bs-gray-700);
        font-weight: bold;
        transition: all 0.2s ease-in-out;
    }

    .step.active .dot {
        background-color: var(--bs-primary);
        border-color: var(--bs-primary);
        color: white;
    }

    .step.success .dot {
        background-color: var(--bs-success);
        border-color: var(--bs-success);
        color: white;
    }

    .step.error .dot {
        background-color: var(--bs-danger);
        border-color: var(--bs-danger);
        color: white;
    }

/* Container query: small screens → 2 columns × 2 rows */
@container (max-width: 500px) {
    .step {
        flex: 1 1 calc(50% - 1rem);
    }
}

/* Stepper spacing & alignment tweaks */
.step.active span,
.step span {
    white-space: nowrap;
}

/* Step actions (buttons) */
.step-actions {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap; /* allows better stacking on small screens */
}

    .step-actions .left,
    .step-actions .right {
        flex: 1 1 48%; /* each button ~half width */
        text-align: center;
    }

    .altcha {
        min-width: 100%;
    }

altcha-widget {
    display: block !important; /* make it block-level */
    width: 100% !important; /* take full width of parent */
    min-width: 100% !important; /* optional, ensure it never shrinks */
}

/* Mobile stacking */
@media (max-width: 768px) {
    .step-actions {
        flex-direction: column;
        gap: 0.75rem;
    }

        .step-actions .left,
        .step-actions .right {
            flex: 1 1 100%;
            text-align: center;
        }
}

/* intl-tel-input tweaks */
.iti {
    width: 100% !important; /* full width */
}

.iti__flag-container {
    padding: 0 !important;
    height: 100% !important;
}

.iti__selected-flag {
    margin: 0 !important;
    height: 100% !important;
}

.iti input[type="tel"] {
    padding-left: 50px !important; /* space for flag */
    width: 100% !important;
}

/* Form-step display */
.form-step {
    display: none !important;
}

    .form-step.active {
        display: block !important;
    }
