@font-face {
    font-family: "Montserrat";
    src: url("../fonts/montserrat-latin-wght-normal.woff2") format("woff2");
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

:root {
    --brand: 205 157 77;
    --brand-strong: 124 82 18;
    --brand-on: 40 56 73;
    --brand-soft: 248 236 216;
    --brand-deep: 40 56 73;
    --brand-line: 232 214 184;
    --brand-ink: 40 56 73;
    --brand-muted: 90 106 124;
    --brand-paper: 255 252 247;
}

html {
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
    scroll-behavior: smooth;
}

body {
    min-height: 100dvh;
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
    font-family: "Montserrat", Arial, sans-serif;
}

input,
select,
textarea,
button {
    font-size: 16px;
}

.form-field {
    display: block;
    width: 100%;
    min-height: 52px;
    border: 1px solid rgb(var(--brand-line));
    border-radius: 0.75rem;
    background: #fff;
    color: rgb(var(--brand-ink));
    font-size: 1rem;
    line-height: 1.5;
    padding: 0.75rem 1rem;
    transition: border-color 150ms ease, box-shadow 150ms ease;
}

.form-field-email {
    padding: 0.75rem 1rem 0.75rem 2.75rem;
}

.form-field-password {
    padding: 0.75rem 3rem 0.75rem 2.75rem;
}

.form-field-with-icon {
    padding-left: 3rem;
}

.whatsapp-action {
    border-color: #bce7c8;
    color: #25a85a;
}

.whatsapp-action:hover {
    border-color: #25d366;
    background: #edf9f0;
    color: #128c3e;
}

.whatsapp-button {
    background: #25d366;
    color: #123524;
}

.whatsapp-button:hover {
    background: #42df7a;
    color: #123524;
}

.form-field:focus {
    border-color: rgb(var(--brand-strong));
    outline: none;
    box-shadow: 0 0 0 3px rgb(var(--brand) / 0.16);
}

.form-field[aria-invalid="true"] {
    border-color: #b91c1c;
}

.form-field[aria-invalid="true"]:focus {
    box-shadow: 0 0 0 3px rgb(185 28 28 / 0.16);
}

.time-picker-24 {
    display: inline-grid;
    grid-template-columns: 3.25rem auto 3.25rem;
    align-items: center;
    gap: 0.15rem;
}

.time-picker-24 input[type="number"] {
    display: block;
    width: 100%;
    min-width: 0;
    min-height: 52px;
    border: 1px solid rgb(var(--brand-line));
    border-radius: 0.75rem;
    background: #fff;
    color: rgb(var(--brand-ink));
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1;
    padding: 0.5rem 0;
    text-align: center;
    letter-spacing: 0.04em;
    appearance: textfield;
    -moz-appearance: textfield;
}

.time-picker-24 input[type="number"]::-webkit-inner-spin-button,
.time-picker-24 input[type="number"]::-webkit-outer-spin-button {
    appearance: none;
    margin: 0;
}

.time-picker-24 input[type="number"]:focus {
    border-color: rgb(var(--brand-strong));
    outline: none;
    box-shadow: 0 0 0 3px rgb(var(--brand) / 0.16);
}

.time-picker-separator {
    color: rgb(var(--brand-ink));
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1;
}

.form-file {
    display: block;
    width: 100%;
    color: rgb(var(--brand-ink));
    font-size: 0.875rem;
}

.form-file::file-selector-button {
    margin-right: 0.75rem;
    border: 0;
    border-radius: 0.75rem;
    background: rgb(var(--brand-soft));
    color: rgb(var(--brand-ink));
    padding: 0.65rem 0.9rem;
    font: inherit;
    font-weight: 600;
}

:focus-visible {
    outline: 3px solid rgb(var(--brand-strong));
    outline-offset: 3px;
}

.tap {
    min-height: 44px;
    min-width: 44px;
}

.booking-slot-panel {
    border: 1px solid rgb(var(--brand-line));
    border-radius: 1.25rem;
    background: #fff;
    padding: 1rem;
}

.booking-slot-helper {
    margin: 0 0 1rem;
    color: rgb(var(--brand-muted));
    font-size: 0.875rem;
    line-height: 1.4;
}

.booking-slot-groups {
    display: grid;
    gap: 0.875rem;
}

.booking-slot-group {
    border-radius: 1rem;
    background: rgb(var(--brand-paper));
    padding: 0.875rem;
}

.booking-slot-group-title {
    margin: 0 0 0.75rem;
    color: rgb(var(--brand-ink));
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.booking-slot-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
}

.booking-slot {
    display: inline-flex;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    border-width: 1px;
    border-radius: 0.75rem;
    font-size: 0.9375rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.appointment-status {
    display: inline-flex;
    width: fit-content;
    grid-column: 2;
    grid-row: 2;
    align-self: start;
    justify-self: start;
    align-items: center;
    min-height: 1.75rem;
    border-radius: 9999px;
    padding: 0.25rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}

.appointment-status--reserved {
    background: #f8ecd8;
    color: #7c5212;
}

.appointment-status--confirmed {
    background: #e3edf5;
    color: #31516d;
}

.appointment-status--cancelled,
.appointment-status--no_show {
    background: #f9e3df;
    color: #9e3c2c;
}

.appointment-status--attended {
    background: #e5eee7;
    color: #356148;
}

.appointment-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.875rem;
}

.appointment-action {
    min-height: 2.25rem;
    border: 1px solid rgb(var(--brand-line));
    border-radius: 0.625rem;
    background: #fff;
    color: rgb(var(--brand-ink));
    padding: 0.375rem 0.625rem;
    font-size: 0.8125rem;
    font-weight: 700;
}

.appointment-action--primary {
    border-color: rgb(var(--brand-deep));
    background: rgb(var(--brand-deep));
    color: #fff;
}

.appointment-action--danger {
    border-color: transparent;
    background: transparent;
    color: #9e3c2c;
}

@media (min-width: 640px) {
    .booking-slot-panel {
        padding: 1.25rem;
    }

    .booking-slot-groups {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1rem;
    }

    .appointment-status {
        grid-column: 3;
        grid-row: 1;
        align-self: center;
        justify-self: end;
    }
}

.safe-bottom {
    padding-bottom: max(2rem, env(safe-area-inset-bottom));
}

.safe-bar {
    padding-bottom: max(0.75rem, env(safe-area-inset-bottom));
}

.lost-panda {
    width: min(100%, 16rem);
    margin: 1rem auto 0.25rem;
}

.lost-panda img {
    display: block;
    width: 100%;
    height: auto;
}

.top-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    z-index: 50;
    background: rgb(var(--brand));
    transform-origin: left;
    animation: top-progress 1s ease-in-out infinite;
}

.htmx-indicator {
    opacity: 0;
    transition: opacity 150ms ease;
}

.htmx-request.htmx-indicator,
.htmx-request .htmx-indicator {
    opacity: 1;
}

[x-cloak] {
    display: none !important;
}

@keyframes top-progress {
    0% {
        transform: scaleX(0.05);
    }
    50% {
        transform: scaleX(0.6);
    }
    100% {
        transform: scaleX(1);
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .top-progress {
        animation: none;
        transform: none;
    }

}

.glow-brand {
    background: radial-gradient(closest-side, rgb(var(--brand) / 0.14), rgb(var(--brand) / 0));
}

.glow-cta {
    background: radial-gradient(closest-side, rgb(var(--brand) / 0.5), rgb(var(--brand) / 0));
}

/* CTA principal: la interacción conserva la identidad de la marca. */
.cta-brand {
    background-color: rgb(var(--brand));
    color: rgb(var(--brand-on));
    transition: background-color 150ms ease, transform 150ms ease;
}

.cta-brand:hover {
    background-color: rgb(var(--brand) / 0.88);
    transform: translateY(-1px);
}

.cta-brand:active {
    background-color: rgb(var(--brand));
    transform: translateY(0);
}

.cta-brand:focus-visible {
    outline: 3px solid rgb(var(--brand-strong));
    outline-offset: 3px;
}

.glow-grafito {
    background: radial-gradient(closest-side, #ebebe7, rgb(235 235 231 / 0));
}

.resaltado-miel {
    background: linear-gradient(transparent 55%, #f6d77a 55%);
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
    padding: 0 0.12em;
}

.cta-grafito {
    background-color: #3b414a;
    color: #ffffff;
    transition: background-color 150ms ease, transform 150ms ease;
}

.cta-grafito:hover {
    background-color: #4a515b;
    transform: translateY(-1px);
}

.cta-grafito:active {
    background-color: #3b414a;
    transform: translateY(0);
}

.cta-grafito:focus-visible {
    outline: 3px solid #2f343c;
    outline-offset: 3px;
}

#como-funciona {
    scroll-margin-top: 1rem;
}

.service-dot {
    display: inline-block;
    width: 0.75rem;
    height: 0.75rem;
    flex-shrink: 0;
    border-radius: 9999px;
    background: var(--service-color, #d99a2b);
}

.service-color--amber { --service-color: #d99a2b; }
.service-color--rose { --service-color: #d9577a; }
.service-color--sky { --service-color: #3b8fd1; }
.service-color--emerald { --service-color: #2f9e6f; }
.service-color--violet { --service-color: #8a63d2; }
.service-color--slate { --service-color: #6b7a8c; }

input[type="file"] {
    max-width: 100%;
}
