/* Shared WhatsApp contact flow — Terapia Clara */
.tc-contact-flow[hidden] {
    display: none !important;
}

.tc-contact-flow {
    --tc-contact-cream: var(--cream, #faf7f2);
    --tc-contact-white: var(--white, #ffffff);
    --tc-contact-taupe: var(--taupe, #c4a882);
    --tc-contact-gold: var(--gold, #b8945a);
    --tc-contact-charcoal: var(--charcoal, #7a6a5a);
    --tc-contact-muted: var(--text-muted, #8a8a8a);
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(57, 47, 39, 0.48);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 280ms ease, visibility 280ms ease;
}

.tc-contact-flow.is-open {
    opacity: 1;
    visibility: visible;
}

.tc-contact-flow__dialog {
    position: relative;
    width: min(100%, 480px);
    max-height: min(90vh, 720px);
    overflow-y: auto;
    padding: 48px 40px 38px;
    border: 1px solid rgba(196, 168, 130, 0.2);
    border-radius: 28px;
    background: var(--tc-contact-white);
    box-shadow: 0 26px 80px rgba(57, 47, 39, 0.2);
    color: var(--tc-contact-charcoal);
    transform: translateY(18px) scale(0.98);
    transition: transform 320ms cubic-bezier(0.22, 1, 0.36, 1);
}

.tc-contact-flow.is-open .tc-contact-flow__dialog {
    transform: translateY(0) scale(1);
}

.tc-contact-flow__close {
    position: absolute;
    top: 18px;
    right: 18px;
    display: grid;
    width: 38px;
    height: 38px;
    padding: 0;
    place-items: center;
    border: 1px solid rgba(122, 106, 90, 0.16);
    border-radius: 50%;
    background: transparent;
    color: var(--tc-contact-muted);
    cursor: pointer;
    transition: color 180ms ease, background-color 180ms ease, border-color 180ms ease;
}

.tc-contact-flow__close:hover,
.tc-contact-flow__close:focus-visible {
    border-color: rgba(196, 168, 130, 0.5);
    background: var(--tc-contact-cream);
    color: var(--tc-contact-charcoal);
}

.tc-contact-flow__icon {
    display: grid;
    width: 52px;
    height: 52px;
    margin-bottom: 20px;
    place-items: center;
    border: 1px solid var(--tc-contact-taupe);
    border-radius: 50%;
    background: var(--tc-contact-cream);
    box-shadow: 0 2px 12px rgba(196, 168, 130, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.8);
    color: var(--tc-contact-gold);
}

.tc-contact-flow__icon svg {
    width: 23px;
    height: 23px;
}

.tc-contact-flow__title {
    margin: 0 44px 8px 0;
    color: var(--tc-contact-charcoal);
    font-family: var(--font-heading, "Cormorant Garamond", Georgia, serif);
    font-size: clamp(1.65rem, 4vw, 1.95rem);
    font-weight: 500;
    line-height: 1.12;
}

.tc-contact-flow__description {
    margin: 0 0 26px;
    color: var(--tc-contact-muted);
    font-family: var(--font-body, "Montserrat", Arial, sans-serif);
    font-size: 0.91rem;
    line-height: 1.65;
}

.tc-contact-flow__consent {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    gap: 11px;
    align-items: start;
    margin-bottom: 18px;
    color: var(--tc-contact-muted);
    font-family: var(--font-body, "Montserrat", Arial, sans-serif);
    font-size: 0.78rem;
    line-height: 1.55;
    cursor: pointer;
}

.tc-contact-flow__consent input {
    width: 17px;
    height: 17px;
    margin: 2px 0 0;
    accent-color: var(--tc-contact-gold);
}

.tc-contact-flow__consent a {
    color: var(--tc-contact-charcoal);
    text-decoration: underline;
    text-decoration-color: var(--tc-contact-taupe);
    text-underline-offset: 2px;
}

.tc-contact-flow__submit {
    display: flex;
    width: 100%;
    min-height: 58px;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 24px;
    border: 1px solid var(--tc-contact-charcoal);
    border-radius: 999px;
    background: var(--tc-contact-charcoal);
    color: var(--tc-contact-white);
    font-family: var(--font-body, "Montserrat", Arial, sans-serif);
    font-size: 0.88rem;
    font-weight: 500;
    line-height: 1.3;
    letter-spacing: 0.01em;
    cursor: pointer;
    transition: transform 180ms ease, opacity 180ms ease, background-color 180ms ease;
}

.tc-contact-flow__submit:not(:disabled):hover,
.tc-contact-flow__submit:not(:disabled):focus-visible {
    background: #695b4e;
    transform: translateY(-1px);
}

.tc-contact-flow__submit:disabled {
    cursor: not-allowed;
    opacity: 0.4;
}

.tc-contact-flow__submit svg {
    width: 21px;
    height: 21px;
    flex: 0 0 auto;
}

.tc-contact-flow__privacy-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 15px 0 0;
    color: var(--tc-contact-muted);
    font-family: var(--font-body, "Montserrat", Arial, sans-serif);
    font-size: 0.73rem;
    line-height: 1.45;
    text-align: center;
}

.tc-contact-flow__privacy-note svg {
    width: 12px;
    height: 12px;
    flex: 0 0 auto;
}

body.tc-contact-flow-open {
    overflow: hidden !important;
}

/* Fallback floating access for templates that do not include one. */
.tc-contact-float {
    position: fixed;
    right: 28px;
    bottom: 28px;
    z-index: 999;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--tc-contact-charcoal, #7a6a5a);
    font-family: var(--font-body, "Montserrat", Arial, sans-serif);
    cursor: pointer;
}

.tc-contact-float__label {
    padding: 8px 13px;
    border: 1px solid rgba(196, 168, 130, 0.18);
    border-radius: 999px;
    background: var(--white, #ffffff);
    box-shadow: 0 6px 24px rgba(57, 47, 39, 0.1);
    font-size: 0.76rem;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    transform: translateX(8px);
    pointer-events: none;
    transition: opacity 220ms ease, transform 220ms ease;
}

.tc-contact-float__icon {
    display: grid;
    width: 54px;
    height: 54px;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 50%;
    background: #25d366;
    box-shadow: 0 5px 20px rgba(37, 211, 102, 0.3);
    color: #ffffff;
    transition: transform 220ms ease, box-shadow 220ms ease;
}

.tc-contact-float__icon svg {
    width: 26px;
    height: 26px;
}

@media (hover: hover) and (pointer: fine) {
    .tc-contact-float:hover .tc-contact-float__label,
    .tc-contact-float:focus-visible .tc-contact-float__label {
        opacity: 1;
        transform: translateX(0);
    }

    .tc-contact-float:hover .tc-contact-float__icon,
    .tc-contact-float:focus-visible .tc-contact-float__icon {
        transform: translateY(-1px);
        box-shadow: 0 7px 24px rgba(37, 211, 102, 0.36);
    }
}

@media (max-width: 560px) {
    .tc-contact-flow {
        align-items: end;
        padding: 12px;
    }

    .tc-contact-flow__dialog {
        width: 100%;
        max-height: calc(100dvh - 24px);
        padding: 42px 24px 28px;
        border-radius: 24px;
    }

    .tc-contact-flow__close {
        top: 14px;
        right: 14px;
    }

    .tc-contact-flow__description {
        margin-bottom: 22px;
    }

    .tc-contact-flow__submit {
        padding-inline: 18px;
    }

    .tc-contact-float {
        right: 18px;
        bottom: 18px;
    }

    .tc-contact-float__label {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .tc-contact-flow,
    .tc-contact-flow__dialog,
    .tc-contact-flow__close,
    .tc-contact-flow__submit,
    .tc-contact-float__label,
    .tc-contact-float__icon {
        transition: none;
    }
}
