/**
 * Front-page sticky contact — quiet, contextual access to a real person.
 * Status + identity left, CTA right. Close sits in a reserved corner.
 */

.fp-sticky-contact-host[hidden] {
    display: none;
}

.fp-sticky-contact-host {
    position: fixed;
    right: max(clamp(12px, 2vw, 28px), env(safe-area-inset-right));
    bottom: calc(
        max(clamp(12px, 2vw, 24px), env(safe-area-inset-bottom))
        + var(--t1-consent-offset, 0px)
    );
    z-index: 80;
    width: min(26rem, calc(100vw - 24px));
    min-width: 0;
    box-sizing: border-box;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: bottom 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.fp-sticky-contact {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    align-items: start;
    gap: var(--wp--preset--spacing--12);
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: var(--wp--preset--spacing--12) var(--wp--preset--spacing--16) var(--wp--preset--spacing--12) var(--wp--preset--spacing--12);
    box-sizing: border-box;
    border: 1px solid color-mix(in srgb, var(--wp--preset--color--text-main) 10%, transparent);
    border-radius: 18px;
    background: color-mix(in srgb, var(--wp--preset--color--card) 94%, transparent);
    box-shadow:
        0 2px 4px color-mix(in srgb, var(--wp--preset--color--text-main) 5%, transparent),
        0 14px 38px color-mix(in srgb, var(--wp--preset--color--text-main) 12%, transparent);
    color: var(--wp--preset--color--text-main);
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.fp-sticky-contact:hover {
    border-color: color-mix(in srgb, var(--wp--preset--color--text-main) 18%, transparent);
}

.fp-sticky-contact__close {
    position: absolute;
    top: 4px;
    right: 4px;
    z-index: 2;
    display: grid;
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    padding: 0;
    place-items: center;
    box-sizing: border-box;
    border: 1px solid transparent;
    border-radius: 50%;
    background: transparent;
    color: var(--wp--preset--color--text-muted);
    cursor: pointer;
}

.fp-sticky-contact__close::before {
    position: absolute;
    inset: -6px;
    content: "";
}

.fp-sticky-contact__close:hover,
.fp-sticky-contact__close:focus-visible {
    background: var(--wp--preset--color--surface);
    border-color: color-mix(in srgb, var(--wp--preset--color--text-main) 16%, transparent);
    color: var(--wp--preset--color--text-main);
}

.fp-sticky-contact:focus-visible,
.fp-sticky-contact__close:focus-visible {
    outline: 2px solid var(--wp--preset--color--accent);
    outline-offset: 2px;
}

.fp-sticky-contact__close svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
}

.fp-sticky-contact__photo {
    display: block;
    width: 48px;
    height: 48px;
    margin-top: 2px;
    object-fit: cover;
    border: 1px solid color-mix(in srgb, var(--wp--preset--color--text-main) 10%, transparent);
    border-radius: 50%;
}

.fp-sticky-contact__content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    column-gap: var(--wp--preset--spacing--16);
    row-gap: var(--wp--preset--spacing--4);
    min-width: 0;
    padding-right: var(--wp--preset--spacing--24);
    box-sizing: border-box;
}

.fp-sticky-contact__status {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: var(--wp--preset--spacing--8);
    min-width: 0;
    margin: 0;
    font-size: var(--wp--preset--font-size--sm);
    line-height: 1.3;
    color: var(--wp--preset--color--text-muted);
}

.fp-sticky-contact__status-dot {
    width: 6px;
    height: 6px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: var(--wp--preset--color--text-light);
}

.fp-sticky-contact__status.is-live .fp-sticky-contact__status-dot {
    background: var(--wp--preset--color--status-green);
}

.fp-sticky-contact__identity {
    display: grid;
    gap: 1px;
    min-width: 0;
}

.fp-sticky-contact__name {
    min-width: 0;
    margin: 0;
    overflow: hidden;
    font-family: var(--wp--preset--font-family--heading);
    font-size: var(--wp--preset--font-size--lg);
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.025em;
    color: var(--wp--preset--color--text-main);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fp-sticky-contact__role {
    min-width: 0;
    margin: 0;
    overflow: hidden;
    font-size: var(--wp--preset--font-size--sm);
    line-height: 1.35;
    color: var(--wp--preset--color--text-muted);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fp-sticky-contact__action {
    display: inline-flex;
    align-items: center;
    align-self: center;
    gap: var(--wp--preset--spacing--4);
    max-width: 100%;
    box-sizing: border-box;
    font-size: var(--wp--preset--font-size--sm);
    font-weight: 600;
    line-height: 1.3;
    color: var(--wp--preset--color--text-main);
    white-space: nowrap;
}

.fp-sticky-contact__action .arrow-icon {
    width: 14px;
    height: 14px;
    flex: 0 0 auto;
    color: currentColor;
}

@media (max-width: 480px) {
    .fp-sticky-contact-host {
        right: max(12px, env(safe-area-inset-right));
        bottom: calc(max(12px, env(safe-area-inset-bottom)) + var(--t1-consent-offset, 0px));
        width: calc(100vw - 24px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .fp-sticky-contact-host {
        transform: none !important;
        transition: none;
    }
}
