/*
|--------------------------------------------------------------------------
| Atlas Forms · Public UI
|--------------------------------------------------------------------------
*/

.atlas-public-form {
    --atlas-navy: #071b3d;
    --atlas-navy-soft: #102b59;
    --atlas-gold: #c9a227;
    --atlas-text: #243247;
    --atlas-muted: #667085;
    --atlas-border: #d9dee7;
    --atlas-surface: #ffffff;
    --atlas-background: #f5f7fa;
    --atlas-danger: #b42318;

    padding: clamp(3rem, 6vw, 5.5rem) 0;
    background:
        linear-gradient(
            180deg,
            #f7f9fc 0%,
            #ffffff 100%
        );
    color: var(--atlas-text);
}

.atlas-public-form *,
.atlas-public-form *::before,
.atlas-public-form *::after {
    box-sizing: border-box;
}

.atlas-public-form .container {
    width: min(100% - 2rem, 1180px);
    margin-inline: auto;
}

.atlas-form-shell {
    max-width: 940px;
    margin-inline: auto;
}

.atlas-form-header {
    max-width: 760px;
    margin-bottom: 2rem;
}

.atlas-form-eyebrow {
    display: inline-block;
    margin-bottom: .75rem;
    color: var(--atlas-gold);
    font-size: .76rem;
    font-weight: 800;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.atlas-form-header h1 {
    margin: 0 0 .8rem;
    color: var(--atlas-navy);
    font-family: "EB Garamond", Georgia, serif;
    font-size: clamp(2.3rem, 5vw, 3.5rem);
    font-weight: 600;
    line-height: 1.05;
}

.atlas-form-description {
    max-width: 700px;
    margin: 0;
    color: var(--atlas-muted);
    font-size: 1.05rem;
    line-height: 1.7;
}

.atlas-form-card {
    padding: clamp(1.5rem, 4vw, 3rem);
    background: var(--atlas-surface);
    border: 1px solid #e4e8ef;
    border-radius: 18px;
    box-shadow:
        0 20px 55px rgba(7, 27, 61, .08);
}

.atlas-form-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 1.4rem 1.25rem;
}

.atlas-form-field {
    grid-column: span 12;
    min-width: 0;
}

.atlas-form-field[data-width="25"] {
    grid-column: span 3;
}

.atlas-form-field[data-width="33"] {
    grid-column: span 4;
}

.atlas-form-field[data-width="50"] {
    grid-column: span 6;
}

.atlas-form-field[data-width="66"] {
    grid-column: span 8;
}

.atlas-form-field[data-width="75"] {
    grid-column: span 9;
}

.atlas-form-field label,
.atlas-form-field .form-label {
    display: block;
    margin: 0 0 .5rem;
    color: var(--atlas-navy);
    font-size: .91rem;
    font-weight: 700;
    line-height: 1.4;
}

.atlas-form-field input:not([type="checkbox"]):not([type="radio"]),
.atlas-form-field select,
.atlas-form-field textarea {
    display: block;
    width: 100%;
    min-height: 50px;
    margin: 0;
    padding: .8rem .95rem;
    border: 1px solid var(--atlas-border);
    border-radius: 8px;
    outline: 0;
    background: #fff;
    color: var(--atlas-text);
    font: inherit;
    font-size: .96rem;
    line-height: 1.4;
    transition:
        border-color .18s ease,
        box-shadow .18s ease;
}

.atlas-form-field textarea {
    min-height: 145px;
    resize: vertical;
}

.atlas-form-field input:focus,
.atlas-form-field select:focus,
.atlas-form-field textarea:focus {
    border-color: var(--atlas-navy-soft);
    box-shadow:
        0 0 0 3px rgba(16, 43, 89, .1);
}

.atlas-form-field input::placeholder,
.atlas-form-field textarea::placeholder {
    color: #98a2b3;
}

.atlas-form-field select {
    cursor: pointer;
}

.atlas-form-field input[type="file"] {
    min-height: auto;
    padding: .65rem;
    background: #f9fafb;
}

.atlas-form-field input[type="file"]::file-selector-button {
    margin-right: .85rem;
    padding: .55rem .85rem;
    border: 0;
    border-radius: 6px;
    background: var(--atlas-navy);
    color: #fff;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.atlas-required {
    margin-left: .15rem;
    color: var(--atlas-danger);
}

.atlas-form-help,
.atlas-form-field .form-text {
    margin-top: .45rem;
    color: var(--atlas-muted);
    font-size: .82rem;
    line-height: 1.5;
}

.atlas-form-check {
    display: flex;
    align-items: flex-start;
    gap: .65rem;
}

.atlas-form-check input[type="checkbox"],
.atlas-form-check input[type="radio"] {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    margin: .15rem 0 0;
    accent-color: var(--atlas-navy);
}

.atlas-form-check label {
    margin: 0;
    font-weight: 500;
    line-height: 1.55;
}

.atlas-form-options {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem 1.5rem;
    padding-top: .25rem;
}

.atlas-form-options .form-check {
    display: flex;
    align-items: center;
    gap: .45rem;
}

.atlas-form-options .form-check input {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: var(--atlas-navy);
}

.atlas-form-options .form-check label {
    margin: 0;
    font-weight: 500;
}

.atlas-form-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: .75rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #edf0f4;
}

.atlas-form-button {
    display: inline-flex;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    padding: .75rem 1.5rem;
    border: 1px solid var(--atlas-navy);
    border-radius: 7px;
    background: var(--atlas-navy);
    color: #fff;
    font: inherit;
    font-size: .93rem;
    font-weight: 800;
    cursor: pointer;
    transition:
        transform .15s ease,
        background .15s ease,
        border-color .15s ease;
}

.atlas-form-button:hover {
    background: var(--atlas-navy-soft);
    border-color: var(--atlas-navy-soft);
    transform: translateY(-1px);
}

.atlas-form-button-secondary {
    background: transparent;
    color: var(--atlas-navy);
}

.atlas-form-button-secondary:hover {
    background: #f3f6fa;
    color: var(--atlas-navy);
}

/*
|--------------------------------------------------------------------------
| Wizard
|--------------------------------------------------------------------------
*/

.atlas-form-progress {
    display: grid;
    grid-template-columns:
        repeat(var(--atlas-step-count, 3), minmax(0, 1fr));
    gap: .5rem;
    margin-bottom: 2.25rem;
}

.atlas-form-progress-item {
    position: relative;
    padding: .85rem .65rem;
    border-bottom: 3px solid #dfe4eb;
    color: #7b8494;
    font-size: .78rem;
    font-weight: 700;
    text-align: center;
}

.atlas-form-progress-item.is-active {
    border-color: var(--atlas-gold);
    color: var(--atlas-navy);
}

.atlas-form-step-title {
    margin: 0 0 .4rem;
    color: var(--atlas-navy);
    font-family: "EB Garamond", Georgia, serif;
    font-size: 1.75rem;
}

.atlas-form-step-description {
    margin: 0 0 1.75rem;
    color: var(--atlas-muted);
    line-height: 1.65;
}

.atlas-form-step[hidden] {
    display: none !important;
}

/*
|--------------------------------------------------------------------------
| Responsive
|--------------------------------------------------------------------------
*/

@media (max-width: 767px) {
    .atlas-public-form {
        padding: 2.5rem 0;
    }

    .atlas-form-card {
        padding: 1.25rem;
        border-radius: 12px;
    }

    .atlas-form-field,
    .atlas-form-field[data-width="25"],
    .atlas-form-field[data-width="33"],
    .atlas-form-field[data-width="50"],
    .atlas-form-field[data-width="66"],
    .atlas-form-field[data-width="75"] {
        grid-column: span 12;
    }

    .atlas-form-progress {
        grid-template-columns: 1fr;
    }

    .atlas-form-progress-item {
        padding: .55rem;
        text-align: left;
    }

    .atlas-form-actions {
        flex-wrap: wrap;
    }

    .atlas-form-button {
        width: 100%;
    }
}

/* Atlas Forms · feedback y validación */
.atlas-form-alert{
    margin:0 0 1.5rem;
    padding:1rem 1.15rem;
    border:1px solid;
    border-radius:12px;
    line-height:1.55;
}

.atlas-form-alert-success{
    background:#f0f8f4;
    border-color:#b9dcc9;
    color:#175c3a;
}

.atlas-form-alert-error{
    background:#fff4f4;
    border-color:#e8bcbc;
    color:#8a2525;
}

.atlas-form-folio{
    margin-top:.35rem;
    font-size:.92rem;
}

.atlas-form-field.has-error .form-control,
.atlas-form-field.has-error .form-select{
    border-color:#b42318;
}

.atlas-field-error{
    margin-top:.4rem;
    color:#b42318;
    font-size:.875rem;
    line-height:1.4;
}
