/* ====================================
   Flujo Crear Presencia
   ==================================== */

.presencia-page {
    padding: calc(var(--nav-h) + 2.5rem) 0 5rem;
    min-height: 100svh;
}

.presencia-shell {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: clamp(2rem, 5vw, 4rem);
    align-items: start;
}

.presencia-aside {
    position: sticky;
    top: calc(var(--nav-h) + 1.5rem);
}

.presencia-aside h1 {
    font-family: var(--font-display);
    font-size: 2.25rem;
    font-weight: 700;
    letter-spacing: -0.04em;
    color: var(--ink);
    line-height: 1.02;
    margin: 0.5rem 0 1rem;
}

.presencia-aside > p {
    color: var(--muted);
    font-size: 0.95rem;
    margin-bottom: 2rem;
}

.steps-rail {
    display: grid;
    gap: 0;
    border-left: 1px solid var(--line);
    padding-left: 1.25rem;
}

.step-rail-item {
    position: relative;
    padding: 0.85rem 0;
    color: var(--muted);
    font-size: 0.9rem;
}

.step-rail-item::before {
    content: "";
    position: absolute;
    left: -1.4rem;
    top: 1.2rem;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--mist);
    border: 1px solid var(--line);
}

.step-rail-item.active {
    color: var(--ink);
}

.step-rail-item.active::before {
    background: var(--brass);
    border-color: var(--brass);
}

.step-rail-item.done {
    color: var(--accent);
}

.step-rail-item.done::before {
    background: var(--accent);
    border-color: var(--accent);
}

.step-rail-item span {
    display: block;
    font-size: 0.68rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    margin-bottom: 0.2rem;
    opacity: 0.7;
}

.presencia-main {
    background: var(--surface);
    border: 1px solid var(--line);
    padding: clamp(1.75rem, 4vw, 2.75rem);
    min-height: 32rem;
}

.wizard-step {
    display: none;
    animation: rise 0.55s var(--ease);
}

.wizard-step.active {
    display: block;
}

.wizard-step h2 {
    font-family: var(--font-display);
    font-size: clamp(1.7rem, 3vw, 2.2rem);
    font-weight: 700;
    letter-spacing: -0.04em;
    color: var(--ink);
    margin-bottom: 0.6rem;
}

.wizard-step > .step-intro {
    color: var(--muted);
    margin-bottom: 2rem;
    max-width: 36rem;
}

.form-grid {
    display: grid;
    gap: 1.25rem;
}

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

.field label {
    display: block;
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 0.55rem;
}

.field input,
.field select,
.field textarea {
    width: 100%;
    background: transparent;
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    padding: 0.7rem 0;
    outline: none;
    transition: border-color var(--t);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    border-color: var(--accent);
}

.field textarea {
    min-height: 7.5rem;
    resize: vertical;
    line-height: 1.6;
}

.field .hint {
    margin-top: 0.45rem;
    font-size: 0.82rem;
    color: var(--muted);
}

/* Photos */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.photo-slot {
    position: relative;
    aspect-ratio: 3 / 4;
    border: 1px dashed rgba(26, 31, 36, 0.18);
    background: var(--paper);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1rem;
    cursor: pointer;
    transition: border-color var(--t), background var(--t);
    overflow: hidden;
}

.photo-slot:hover,
.photo-slot.has-file {
    border-style: solid;
    border-color: var(--accent);
}

.photo-slot input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.photo-slot .slot-label {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--ink);
    margin-bottom: 0.35rem;
}

.photo-slot .slot-hint {
    font-size: 0.78rem;
    color: var(--muted);
    max-width: 10rem;
}

.photo-slot img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-slot.has-file .slot-label,
.photo-slot.has-file .slot-hint {
    display: none;
}

/* Chat paste */
.chat-box {
    border: 1px solid var(--line);
    background: var(--paper);
    padding: 1rem;
}

.chat-box textarea {
    border: 0;
    min-height: 9rem;
    width: 100%;
    background: transparent;
    outline: none;
    resize: vertical;
}

/* Audio */
.audio-panel {
    border: 1px solid var(--line);
    padding: 1.75rem;
    background: var(--paper);
}

.audio-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.audio-meter {
    height: 3px;
    background: var(--mist);
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.audio-meter > span {
    display: block;
    height: 100%;
    width: 0;
    background: var(--brass);
    transition: width 0.2s linear;
}

.audio-status {
    font-size: 0.92rem;
    color: var(--muted);
}

.audio-status.ok {
    color: var(--accent);
}

.audio-status.warn {
    color: #8a5a3a;
}

.audio-file-name {
    margin-top: 0.75rem;
    font-size: 0.85rem;
    color: var(--ink-soft);
}

/* Review */
.review-list {
    display: grid;
    gap: 1rem;
    margin-bottom: 2rem;
}

.review-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--line);
    font-size: 0.95rem;
}

.review-row strong {
    font-weight: 400;
    color: var(--ink);
}

.review-row span {
    color: var(--muted);
    text-align: right;
}

.pay-box {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    padding: 1.5rem 0 0;
}

.pay-amount {
    font-family: var(--font-display);
    font-size: 2.4rem;
    font-weight: 700;
    letter-spacing: -0.045em;
    color: var(--ink);
    line-height: 1;
}

.pay-amount small {
    display: block;
    font-family: var(--font-body);
    font-size: 0.78rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
    margin-top: 0.4rem;
}

.pay-amount .pay-note {
    letter-spacing: 0.02em;
    text-transform: none;
    font-size: 0.85rem;
    line-height: 1.4;
    margin-top: 0.65rem;
    max-width: 18rem;
}

.wizard-nav {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--line);
}

.consent {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    font-size: 0.9rem;
    color: var(--muted);
    margin-top: 1.5rem;
}

.consent input {
    margin-top: 0.25rem;
    accent-color: var(--accent);
}

.success-panel {
    text-align: center;
    padding: 3rem 1rem;
}

.success-panel h2 {
    margin-bottom: 1rem;
}

.success-panel p {
    color: var(--muted);
    max-width: 28rem;
    margin: 0 auto 2rem;
}

@media (max-width: 900px) {
    .presencia-shell {
        grid-template-columns: 1fr;
    }

    .presencia-aside {
        position: static;
    }

    .steps-rail {
        display: flex;
        gap: 1rem;
        border-left: 0;
        padding-left: 0;
        overflow-x: auto;
        padding-bottom: 0.5rem;
    }

    .step-rail-item {
        min-width: 7.5rem;
        border-top: 1px solid var(--line);
        padding-top: 1rem;
    }

    .step-rail-item::before {
        left: 0;
        top: -4px;
    }
}

@media (max-width: 640px) {
    .presencia-page {
        padding-top: calc(var(--nav-h) + 1.5rem);
        padding-bottom: 3.5rem;
    }

    .presencia-aside h1 {
        font-size: 1.85rem;
        letter-spacing: -0.03em;
    }

    .presencia-aside > p {
        font-size: 0.92rem;
    }

    .presencia-main {
        padding: 1.35rem 1.1rem 1.5rem;
        min-height: auto;
    }

    .wizard-step h2 {
        font-size: 1.45rem;
        line-height: 1.15;
    }

    .wizard-step > .step-intro {
        font-size: 0.92rem;
        margin-bottom: 1.4rem;
    }

    .form-grid.two,
    .photo-grid {
        grid-template-columns: 1fr;
    }

    .photo-slot {
        aspect-ratio: 4 / 3;
    }

    .pay-box {
        flex-direction: column;
        align-items: stretch;
    }

    .pay-amount {
        font-size: 1.85rem;
    }

    .wizard-nav {
        flex-direction: column-reverse;
        gap: 0.7rem;
    }

    .wizard-nav .btn {
        width: 100%;
    }

    .steps-rail {
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .steps-rail::-webkit-scrollbar {
        display: none;
    }

    .step-rail-item {
        min-width: 6.5rem;
        font-size: 0.82rem;
    }
}
