.ocf-chat-widget {
    position: fixed;
    right: max(1rem, env(safe-area-inset-right));
    bottom: max(1rem, env(safe-area-inset-bottom));
    z-index: 1100;
    display: grid;
    justify-items: end;
    gap: 0.75rem;
    pointer-events: none;
}

.ocf-chat-bubble,
.ocf-chat-panel {
    pointer-events: auto;
}

.ocf-chat-bubble {
    display: inline-grid;
    width: 56px;
    height: 56px;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--ocf-primary);
    color: var(--ocf-primary-contrast, #fff);
    box-shadow: 0 0.75rem 1.75rem rgba(17, 24, 39, 0.22);
    transition: background 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.ocf-chat-bubble:hover,
.ocf-chat-bubble:focus-visible {
    background: var(--ocf-primary-hover);
    box-shadow: 0 0.9rem 2rem rgba(17, 24, 39, 0.28);
    transform: translateY(-2px);
}

.ocf-chat-bubble svg {
    width: 25px;
    height: 25px;
}

.ocf-chat-panel {
    display: none;
    width: min(23rem, calc(100vw - 2rem));
    max-height: calc(100dvh - 6.5rem);
    overflow-y: auto;
    padding: 1.25rem;
    border: 1px solid var(--ocf-border);
    border-radius: var(--card-radius);
    background: var(--ocf-bg);
    color: var(--ocf-body);
    box-shadow: 0 1.25rem 3rem rgba(17, 24, 39, 0.24);
}

.ocf-chat-widget.is-open .ocf-chat-panel {
    display: block;
}

.ocf-chat-widget.is-open .ocf-chat-bubble {
    display: none;
}

.ocf-chat-panel__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.ocf-chat-panel__eyebrow {
    margin: 0 0 0.3rem;
    color: var(--ocf-primary);
    font-size: 0.7rem;
    font-weight: var(--font-weight-bold);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.ocf-chat-panel h2 {
    margin: 0;
    color: var(--ocf-heading);
    font-size: var(--font-h3-size);
    line-height: 1.15;
}

.ocf-chat-panel__intro {
    margin: 0.65rem 0 1rem;
    font-size: var(--font-label-size);
}

.ocf-chat-panel__close {
    display: inline-grid;
    flex: 0 0 auto;
    width: 2rem;
    height: 2rem;
    place-items: center;
    padding: 0;
    border: 1px solid var(--ocf-border);
    border-radius: 50%;
    background: var(--ocf-bg-alt);
    color: var(--ocf-heading);
}

.ocf-chat-panel__close svg {
    width: 1rem;
    height: 1rem;
}

.ocf-chat-form,
.ocf-chat-form label {
    display: grid;
}

.ocf-chat-form {
    gap: 0.75rem;
}

.ocf-chat-form__names {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
}

.ocf-chat-form label {
    gap: 0.3rem;
    min-width: 0;
    color: var(--ocf-heading);
    font-size: 0.78rem;
    font-weight: var(--font-weight-semibold);
}

.ocf-chat-form input,
.ocf-chat-form textarea {
    width: 100%;
    min-width: 0;
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--ocf-border);
    border-radius: var(--radius-sm);
    background: var(--ocf-bg);
    color: var(--ocf-heading);
    font: inherit;
    font-weight: var(--font-weight-regular);
    outline: none;
}

.ocf-chat-form textarea {
    min-height: 5.25rem;
    resize: vertical;
}

.ocf-chat-form input:focus,
.ocf-chat-form textarea:focus {
    border-color: var(--ocf-primary);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--ocf-primary) 12%, transparent);
}

.ocf-chat-form__submit {
    width: 100%;
    justify-content: center;
    margin-top: 0.15rem;
}

.ocf-chat-form .ocf-form-status {
    margin: 0;
    line-height: 1.45;
}

.ocf-chat-form .ocf-form-status.is-visible {
    padding: 0.75rem;
    border-radius: var(--radius-sm);
    background: var(--ocf-bg-alt);
}

@media (max-width: 480px) {
    .ocf-chat-widget {
        right: 0.75rem;
        bottom: max(0.75rem, env(safe-area-inset-bottom));
    }

    .ocf-chat-panel {
        width: calc(100vw - 1.5rem);
        max-height: calc(100dvh - 5.5rem);
        padding: 1rem;
    }

    .ocf-chat-form__names {
        grid-template-columns: 1fr;
    }
}

/* OCF_AGENT_BLOCK:alamo-chat-sms-consent START */
.ocf-chat-consent {
    display: grid;
    gap: 0.35rem;
    min-width: 0;
    padding-top: 0.2rem;
    border-top: 1px solid var(--ocf-border-light);
}
.ocf-chat-form .ocf-chat-consent label {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    padding: 0.25rem 0;
    color: var(--ocf-body);
    font-size: 12px;
    font-weight: 400;
    line-height: 1.45;
    cursor: pointer;
    overflow-wrap: anywhere;
}
.ocf-chat-form .ocf-chat-consent label span { font-size: inherit; line-height: inherit; }
.ocf-chat-consent input[type="checkbox"] {
    display: block;
    width: 18px;
    min-width: 18px;
    height: 18px;
    flex: 0 0 18px;
    margin: 0.07rem 0 0;
    padding: 0;
    accent-color: var(--ocf-primary);
    cursor: pointer;
}
.ocf-chat-form .ocf-chat-consent__note {
    margin: 0;
    color: var(--ocf-body);
    font-size: 12px;
    line-height: 1.45;
}
.ocf-chat-consent__note a { color: var(--ocf-primary); text-decoration: underline; text-underline-offset: 2px; }
/* OCF_AGENT_BLOCK:alamo-chat-sms-consent END */
