/* === VARIÁVEIS GLOBAIS DE INTERFACE === */
:root {
    --os-brand:       #8b5cf6;
    --os-brand-soft:  hsl(265 60% 94%);
    --os-border:      hsl(214 8% 86%);
    --os-surface:     #ffffff;
    --os-text:        hsl(220 8% 16%);
    --os-muted:       hsl(218 6% 46%);
    --os-radius-sm:   6px;
    --os-radius:      8px;
    --os-radius-pill: 20px;
}

.chatonline-booking,
.chatonline-booking * {
    box-sizing: border-box;
}

.chatonline-booking {
    --chatonline-primary: #E86A58;
    --chatonline-whatsapp: #25D366;
    width: 100%;
    min-height: 100%;
    margin: 0;
    color: #08142b;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #f7f9fc;
    line-height: 1.45;
}

.chatonline-booking img {
    max-width: 100%;
}

.chatonline-container {
    width: min(100% - 32px, 1180px);
    margin: 0 auto;
}

.chatonline-header {
    background: #fff;
    border-bottom: 1px solid #dce3ed;
}

.chatonline-header-inner {
    min-height: 78px;
    width: min(100% - 32px, 1180px);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.chatonline-brand {
    display: flex;
    align-items: center;
    min-width: 190px;
}

.chatonline-logo-image {
    display: block;
    max-width: 220px;
    max-height: 62px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.chatonline-logo-placeholder {
    min-width: 192px;
    min-height: 48px;
    padding: 12px 18px;
    border-radius: 4px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    background: #e6e9ef;
    color: #19243a;
    font-size: 13px;
}

.chatonline-header-title {
    font-size: clamp(20px, 2.4vw, 28px);
    line-height: 1.2;
    font-weight: 800;
    text-align: right;
}

.chatonline-hero {
    padding: 48px 0 46px;
    text-align: center;
    background: #eef5ff;
}

.chatonline-hero h1 {
    margin: 0 0 14px;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.1;
    font-weight: 800;
    color: #061127;
}

.chatonline-hero p {
    max-width: 760px;
    margin: 0 auto;
    font-size: clamp(16px, 2vw, 20px);
    line-height: 1.55;
    color: #16213a;
}

.chatonline-main {
    padding: 34px 0 58px;
}

.chatonline-form {
    padding: clamp(22px, 4vw, 36px);
    border-radius: 15px;
    border-top: 4px solid var(--chatonline-primary);
    background: #fff;
    box-shadow: 0 4px 18px rgba(15, 23, 42, .14);
}

.chatonline-grid {
    display: grid;
    gap: 18px 24px;
}

.chatonline-grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.chatonline-address-grid {
    grid-template-columns: 1fr 1fr 1fr .8fr;
}

.chatonline-field {
    margin: 0 0 22px;
    padding: 0;
    border: 0;
    min-width: 0;
}

.chatonline-grid .chatonline-field {
    margin-bottom: 22px;
}

.chatonline-field > label,
.chatonline-service-field > legend {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 8px;
    padding: 0;
    color: #061127;
    font-size: 15px;
    font-weight: 700;
}

.chatonline-service-field > legend {
    width: 100%;
}

.chatonline-label-icon {
    width: 17px;
    height: 17px;
    color: var(--chatonline-primary);
    display: inline-flex;
    flex: 0 0 17px;
}

.chatonline-label-icon svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
}

.chatonline-whatsapp-icon .chatonline-label-icon {
    width: 20px;
    height: 20px;
    color: currentColor;
}

.chatonline-form input[type="text"],
.chatonline-form input[type="tel"],
.chatonline-form input[type="email"],
.chatonline-form select,
.chatonline-form textarea {
    width: 100%;
    margin: 0;
    border: 1px solid #c8d1df;
    border-radius: 9px;
    background: #fff;
    color: #182238;
    font: inherit;
    font-size: 15px;
    outline: 0;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
    appearance: none;
}

.chatonline-form input[type="text"],
.chatonline-form input[type="tel"],
.chatonline-form input[type="email"],
.chatonline-form select {
    height: 48px;
    padding: 0 14px;
}

.chatonline-form textarea {
    min-height: 112px;
    padding: 13px 14px;
    resize: vertical;
}

.chatonline-form input[type="text"]:focus,
.chatonline-form input[type="tel"]:focus,
.chatonline-form input[type="email"]:focus,
.chatonline-form select:focus,
.chatonline-form textarea:focus {
    border-color: var(--os-brand);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--os-brand) 14%, transparent);
}

.chatonline-form input::placeholder,
.chatonline-form textarea::placeholder {
    color: #9aa3b2;
}

.chatonline-input-status-wrap {
    position: relative;
}

.chatonline-input-status {
    position: absolute;
    right: 12px;
    top: 50%;
    max-width: 52%;
    transform: translateY(-50%);
    font-size: 12px;
    text-align: right;
    color: #556074;
    pointer-events: none;
}

.chatonline-services {
    display: grid;
    gap: 14px;
}

.chatonline-services-cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.chatonline-services-list {
    grid-template-columns: 1fr;
}

.chatonline-service-option {
    position: relative;
    min-width: 0;
}

.chatonline-service-control {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: 0;
    opacity: 0;
    pointer-events: none;
}

.chatonline-service-card {
    position: relative;
    width: 100%;
    min-height: 96px;
    margin: 0 !important;
    padding: 15px 42px 15px 15px;
    display: flex !important;
    align-items: center !important;
    gap: 13px !important;
    border: 1px solid #c8d1df;
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease, background .18s ease;
}

.chatonline-services-list .chatonline-service-card {
    min-height: 78px;
}

.chatonline-service-card:hover {
    border-color: var(--chatonline-primary);
    transform: translateY(-1px);
    box-shadow: 0 5px 14px rgba(15, 23, 42, .09);
}

.chatonline-service-control:focus-visible + .chatonline-service-card {
    border-color: var(--chatonline-primary);
    box-shadow: 0 0 0 3px rgba(21, 87, 255, .16);
}

.chatonline-service-control:checked + .chatonline-service-card {
    border-color: var(--chatonline-primary);
    background: #f3f7ff;
    box-shadow: 0 0 0 2px var(--chatonline-primary);
}

.chatonline-service-icon {
    width: 54px;
    height: 54px;
    flex: 0 0 54px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 12px;
    background: #eef4ff;
    color: var(--chatonline-primary);
}

.chatonline-service-icon-image {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    padding: 8px;
}

.chatonline-service-icon-fallback {
    width: 30px;
    height: 30px;
    fill: currentColor;
}

.chatonline-service-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.chatonline-service-copy strong {
    font-size: 15px;
    line-height: 1.25;
    color: #08142b;
}

.chatonline-service-copy small {
    font-size: 12px;
    line-height: 1.35;
    font-weight: 400;
    color: #667085;
}

.chatonline-service-check {
    position: absolute;
    right: 13px;
    top: 50%;
    width: 22px;
    height: 22px;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #c8d1df;
    border-radius: 999px;
    background: #fff;
    color: transparent;
    font-size: 13px;
    font-weight: 900;
}

.chatonline-service-control:checked + .chatonline-service-card .chatonline-service-check {
    border-color: var(--chatonline-primary);
    background: var(--chatonline-primary);
    color: #fff;
}

.chatonline-services-empty {
    padding: 14px;
    border: 1px solid #fed7aa;
    border-radius: 9px;
    background: #fff7ed;
    color: #9a3412;
}

.chatonline-form-message {
    min-height: 0;
    margin-bottom: 12px;
    border-radius: 8px;
    font-size: 14px;
}

.chatonline-form-message.is-error,
.chatonline-form-message.is-success {
    min-height: auto;
    padding: 11px 13px;
}

.chatonline-form-message.is-error {
    border: 0;
    border-left: 3px solid hsl(5 48% 52%);
    background: hsl(5 20% 96%);
    color: hsl(5 28% 28%);
}

.chatonline-form-message.is-success {
    border: 0;
    border-left: 3px solid hsl(150 38% 46%);
    background: hsl(150 24% 96%);
    color: hsl(150 28% 24%);
}

.chatonline-submit {
    width: 100%;
    min-height: 50px;
    margin: 0;
    border: 0;
    border-radius: var(--os-radius);
    padding: 12px 18px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    background: var(--os-brand);
    color: #fff;
    font-family: inherit;
    font-size: 18px;
    font-weight: 800;
    line-height: 1.2;
    cursor: pointer;
    transition: filter .2s ease, transform .15s ease, box-shadow .2s ease;
}

.chatonline-submit:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px color-mix(in srgb, var(--os-brand) 28%, transparent);
}

.chatonline-submit:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--os-brand) 25%, transparent);
    outline-offset: 2px;
}

.chatonline-submit:disabled {
    opacity: .58;
    cursor: not-allowed;
    transform: none;
}

@media (max-width: 960px) {
    .chatonline-services-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 820px) {
    .chatonline-grid-2,
    .chatonline-address-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .chatonline-container,
    .chatonline-header-inner {
        width: min(100% - 22px, 1180px);
    }

    .chatonline-header-inner {
        min-height: 70px;
        flex-direction: column;
        justify-content: center;
        padding: 12px 0;
        gap: 10px;
    }

    .chatonline-brand {
        min-width: 0;
        justify-content: center;
    }

    .chatonline-logo-placeholder {
        min-width: 170px;
    }

    .chatonline-header-title {
        text-align: center;
        font-size: 21px;
    }

    .chatonline-hero {
        padding: 34px 0 32px;
    }

    .chatonline-main {
        padding: 20px 0 36px;
    }

    .chatonline-grid-2,
    .chatonline-address-grid,
    .chatonline-services-cards {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .chatonline-services-cards,
    .chatonline-services-list {
        gap: 11px;
    }

    .chatonline-field,
    .chatonline-grid .chatonline-field {
        margin-bottom: 18px;
    }

    .chatonline-form {
        border-radius: 12px;
        padding: 20px 16px;
    }

    .chatonline-service-card {
        min-height: 82px;
        padding: 12px 38px 12px 12px;
    }

    .chatonline-service-icon {
        width: 48px;
        height: 48px;
        flex-basis: 48px;
    }

    .chatonline-submit {
        font-size: 16px;
    }
}

/* Version 1.2: central header, service images and return button. */
@media (min-width: 561px) {
    .chatonline-header-inner {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
        align-items: center;
    }

    .chatonline-brand {
        justify-self: start;
    }

    .chatonline-header-title {
        justify-self: center;
        text-align: center;
    }

    .chatonline-header-balance {
        justify-self: end;
        width: 1px;
        min-height: 1px;
    }
}

.chatonline-service-image-wrap {
    position: relative;
    display: block;
    overflow: hidden;
    flex: 0 0 auto;
    border-radius: 10px;
    background: #dce6f5;
}

.chatonline-service-image {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.chatonline-service-image-wrap::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, .08), rgba(0, 0, 0, .56));
    pointer-events: none;
}

.chatonline-service-image-text {
    position: absolute;
    z-index: 1;
    left: 50%;
    top: 50%;
    width: calc(100% - 24px);
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 16px;
    font-weight: 800;
    line-height: 1.25;
    text-align: center;
    text-shadow: 0 1px 5px rgba(0, 0, 0, .65);
}

.chatonline-services-cards .chatonline-service-card.has-service-image {
    min-height: 0;
    padding: 0 38px 16px 0;
    flex-direction: column;
    align-items: stretch !important;
    gap: 12px !important;
    overflow: hidden;
}

.chatonline-services-cards .has-service-image .chatonline-service-image-wrap {
    width: calc(100% + 38px);
    aspect-ratio: 16 / 9;
    border-radius: 11px 11px 0 0;
}

.chatonline-services-cards .has-service-image .chatonline-service-copy {
    width: calc(100% + 22px);
    padding: 0 14px;
    text-align: center;
    align-items: center;
}

.chatonline-services-cards .has-service-image .chatonline-service-copy strong {
    display: none;
}

.chatonline-services-list .has-service-image .chatonline-service-image-wrap {
    width: 108px;
    height: 68px;
}

.chatonline-services-list .has-service-image .chatonline-service-image-text {
    font-size: 12px;
}

.chatonline-return-button {
    width: 100%;
    min-height: 48px;
    margin: 12px 0 0;
    border: 2px solid var(--chatonline-primary);
    border-radius: 10px;
    padding: 11px 18px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 9px;
    background: #fff;
    color: var(--chatonline-primary);
    text-decoration: none !important;
    font-family: inherit;
    font-size: 16px;
    font-weight: 800;
    line-height: 1.2;
    transition: background .15s ease, color .15s ease, transform .15s ease;
}

.chatonline-return-button:hover {
    background: var(--chatonline-primary);
    color: #fff;
    transform: translateY(-1px);
}

.chatonline-return-button:focus-visible {
    outline: 3px solid rgba(21, 87, 255, .2);
    outline-offset: 2px;
}

@media (max-width: 560px) {
    .chatonline-header-balance {
        display: none;
    }

    .chatonline-services-cards .chatonline-service-card.has-service-image {
        padding-right: 34px;
    }

    .chatonline-services-cards .has-service-image .chatonline-service-image-wrap {
        width: calc(100% + 34px);
    }

    .chatonline-services-list .has-service-image .chatonline-service-image-wrap {
        width: 86px;
        height: 62px;
    }
}


/* Version 1.3: imagens enviadas ocupam o espaço do ícone sem deformação. */
.chatonline-service-icon-image {
    object-position: center;
}

/* Acompanhamento e notificações do cliente */
.chatonline-tracking-card {
    margin: 0 0 22px;
    padding: 22px;
    border: 1px solid #d8e0eb;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 6px 20px rgba(15, 23, 42, .06);
}

.chatonline-tracking-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.chatonline-tracking-header > div > span {
    display: block;
    margin-bottom: 4px;
    color: #667085;
    font-size: 13px;
}

.chatonline-tracking-header h2 {
    margin: 0;
    color: #0f172a;
    font-size: 24px;
}

.chatonline-tracking-status {
    padding: 7px 11px;
    border-radius: 999px;
    background: #eef2f7;
    color: #334155;
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
}

.chatonline-tracking-status.status-new { background: #eef4ff; color: #1d4ed8; }
.chatonline-tracking-status.status-in_progress { background: #fff7ed; color: #c2410c; }
.chatonline-tracking-status.status-scheduled { background: #f5f3ff; color: #6d28d9; }
.chatonline-tracking-status.status-completed { background: #ecfdf3; color: #08733e; }
.chatonline-tracking-status.status-cancelled { background: #fff1f2; color: #be123c; }

.chatonline-tracking-details {
    margin: 18px 0 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.chatonline-tracking-details p {
    margin: 0;
    padding: 13px 14px;
    border-radius: 10px;
    background: #f8fafc;
}

.chatonline-tracking-details strong,
.chatonline-tracking-details span {
    display: block;
}

.chatonline-tracking-details strong {
    margin-bottom: 3px;
    color: #64748b;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .035em;
}

.chatonline-tracking-details span {
    color: #0f172a;
    font-weight: 700;
}

.chatonline-client-push-box {
    margin-top: 16px;
    padding: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    border: 1px solid #d8e0eb;
    border-radius: 12px;
    background: #f8fafc;
}

.chatonline-client-push-box > div {
    min-width: 0;
}

.chatonline-client-push-box strong,
.chatonline-client-push-box span {
    display: block;
}

.chatonline-client-push-box strong {
    margin-bottom: 3px;
    color: #0f172a;
}

.chatonline-client-push-box span {
    color: #475569;
    font-size: 13px;
    line-height: 1.35;
}

.chatonline-client-push-button,
.chatonline-after-submit-links a {
    min-height: 42px;
    padding: 10px 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 9px;
    background: var(--chatonline-primary);
    color: #fff !important;
    font: inherit;
    font-weight: 800;
    text-decoration: none !important;
    cursor: pointer;
}

.chatonline-client-push-button.is-active {
    background: #0f9f65;
}

.chatonline-client-push-button:disabled {
    opacity: .7;
    cursor: not-allowed;
}

.chatonline-client-push-feedback {
    min-height: 18px;
    margin: 8px 0 0;
    font-size: 13px;
}

.chatonline-client-push-feedback.is-success { color: #08733e; }
.chatonline-client-push-feedback.is-error { color: #b42318; }

.chatonline-after-submit {
    margin: 14px 0 0;
    padding: 16px;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    background: #fff;
}

.chatonline-after-submit[hidden] {
    display: none !important;
}

.chatonline-after-submit .chatonline-client-push-box {
    margin-top: 0;
}

.chatonline-after-submit-links {
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.chatonline-after-submit-links .chatonline-open-whatsapp {
    background: var(--chatonline-whatsapp);
}

.chatonline-after-submit-links .chatonline-tracking-link {
    background: #334155;
}

@media (max-width: 620px) {
    .chatonline-tracking-header,
    .chatonline-client-push-box {
        align-items: stretch;
        flex-direction: column;
    }

    .chatonline-tracking-status {
        align-self: flex-start;
    }

    .chatonline-tracking-details {
        grid-template-columns: 1fr;
    }

    .chatonline-client-push-button,
    .chatonline-after-submit-links a {
        width: 100%;
    }
}

.chatonline-cancel-order-button {
    margin-top: 14px;
    padding: 9px 13px;
    border: 1px solid #fecdd3;
    border-radius: 9px;
    background: #fff1f2;
    color: #be123c;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.chatonline-cancel-order-button:hover {
    border-color: #fda4af;
    background: #ffe4e6;
}

.chatonline-cancel-order-button:disabled {
    opacity: .6;
    cursor: not-allowed;
}

.chatonline-cancel-feedback {
    min-height: 18px;
    margin: 8px 0 0;
    font-size: 13px;
}

.chatonline-cancel-feedback.is-success { color: #08733e; }
.chatonline-cancel-feedback.is-error { color: #b42318; }

/* Version 1.5.0: experiência PWA, histórico local e acompanhamento visual. */
.chatonline-booking {
    min-height: 100vh;
    min-height: 100dvh;
    padding-bottom: env(safe-area-inset-bottom, 0);
}

.chatonline-offline-banner {
    position: sticky;
    z-index: 1000;
    top: 0;
    width: 100%;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    background: #7c2d12;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    text-align: center;
}

.chatonline-offline-banner[hidden] {
    display: none !important;
}

.chatonline-offline-banner > span:first-child {
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid currentColor;
    border-radius: 999px;
    line-height: 1;
}

.chatonline-header-actions {
    min-width: 190px;
    display: flex;
    justify-content: flex-end;
}

.chatonline-install-button {
    min-height: 42px;
    padding: 9px 14px;
    border: 1px solid color-mix(in srgb, var(--chatonline-primary) 35%, #fff);
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: color-mix(in srgb, var(--chatonline-primary) 9%, #fff);
    color: var(--chatonline-primary);
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
}

.chatonline-install-button[hidden] {
    display: none !important;
}

.chatonline-install-button .chatonline-label-icon {
    width: 17px;
    height: 17px;
    flex-basis: 17px;
    color: currentColor;
}

.chatonline-hero-kicker {
    display: inline-flex;
    margin-bottom: 11px;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .76);
    color: var(--chatonline-primary);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .035em;
    text-transform: uppercase;
}

.chatonline-hero-cta {
    min-height: 44px;
    margin-top: 22px;
    padding: 10px 18px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--chatonline-primary);
    color: #fff !important;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none !important;
}

.chatonline-form {
    scroll-margin-top: 20px;
}

.chatonline-honeypot {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.chatonline-form-intro {
    margin: 0 0 28px;
    padding-bottom: 22px;
    border-bottom: 1px solid #e5eaf1;
}

.chatonline-form-intro > span,
.chatonline-section-heading > div > span,
.chatonline-success-kicker {
    display: block;
    margin-bottom: 5px;
    color: var(--chatonline-primary);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .045em;
    text-transform: uppercase;
}

.chatonline-form-intro h2,
.chatonline-section-heading h2,
.chatonline-after-submit h2 {
    margin: 0;
    color: #071126;
    font-size: clamp(22px, 3vw, 29px);
    line-height: 1.2;
}

.chatonline-form-intro p,
.chatonline-after-submit > p {
    margin: 8px 0 0;
    color: #556074;
    font-size: 14px;
}

.chatonline-form-section-title {
    margin: 4px 0 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #0f172a;
    font-size: 16px;
}

.chatonline-form-section-title:not(:first-of-type) {
    margin-top: 8px;
}

.chatonline-form-section-title > span {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--chatonline-primary);
    color: #fff;
    font-size: 13px;
    font-weight: 900;
}

.chatonline-sticky-submit {
    position: sticky;
    z-index: 12;
    bottom: max(10px, env(safe-area-inset-bottom, 0px));
    margin: 12px -12px 0;
    padding: 12px;
    border: 1px solid rgba(203, 213, 225, .82);
    border-radius: 14px;
    background: rgba(255, 255, 255, .90);
    box-shadow: 0 12px 30px rgba(15, 23, 42, .12);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.chatonline-sticky-submit small {
    display: block;
    margin-top: 7px;
    color: #64748b;
    font-size: 11px;
    text-align: center;
}

.chatonline-form.is-submitted .chatonline-form-content {
    display: none;
}

.chatonline-recent-orders {
    margin: 0 0 22px;
    padding: 20px;
    border: 1px solid #d8e0eb;
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 5px 18px rgba(15, 23, 42, .06);
}

.chatonline-recent-orders[hidden] {
    display: none !important;
}

.chatonline-section-heading {
    margin-bottom: 14px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.chatonline-section-heading h2 {
    font-size: 21px;
}

.chatonline-clear-history {
    padding: 7px 10px;
    border: 0;
    background: transparent;
    color: #64748b;
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.chatonline-recent-list {
    display: grid;
    gap: 9px;
}

.chatonline-recent-item {
    min-height: 66px;
    padding: 11px 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid #e1e7ef;
    border-radius: 12px;
    background: #f8fafc;
    color: inherit !important;
    text-decoration: none !important;
    transition: border-color .16s ease, transform .16s ease, background .16s ease;
}

.chatonline-recent-item:hover {
    border-color: var(--chatonline-primary);
    background: #fff;
    transform: translateY(-1px);
}

.chatonline-recent-icon {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: color-mix(in srgb, var(--chatonline-primary) 12%, #fff);
    color: var(--chatonline-primary);
    font-weight: 900;
}

.chatonline-recent-copy {
    min-width: 0;
    flex: 1;
}

.chatonline-recent-copy strong,
.chatonline-recent-copy small {
    display: block;
}

.chatonline-recent-copy strong {
    overflow: hidden;
    color: #0f172a;
    font-size: 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chatonline-recent-copy small {
    margin-top: 3px;
    color: #64748b;
    font-size: 11px;
}

.chatonline-recent-arrow {
    color: #94a3b8;
    font-size: 26px;
    line-height: 1;
}

.chatonline-status-timeline {
    margin: 22px 0 4px;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    list-style: none;
}

.chatonline-status-timeline li {
    position: relative;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: #94a3b8;
    text-align: center;
}

.chatonline-status-timeline li:not(:last-child)::after {
    content: "";
    position: absolute;
    z-index: 0;
    top: 16px;
    left: calc(50% + 18px);
    width: calc(100% - 36px);
    height: 3px;
    border-radius: 999px;
    background: #e2e8f0;
}

.chatonline-status-timeline li.is-complete:not(:last-child)::after {
    background: #22a06b;
}

.chatonline-timeline-marker {
    position: relative;
    z-index: 1;
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 3px solid #e2e8f0;
    border-radius: 999px;
    background: #fff;
    color: #94a3b8;
    font-size: 12px;
    font-weight: 900;
}

.chatonline-status-timeline .is-complete .chatonline-timeline-marker {
    border-color: #22a06b;
    background: #22a06b;
    color: #fff;
}

.chatonline-status-timeline .is-current .chatonline-timeline-marker {
    border-color: var(--chatonline-primary);
    background: var(--chatonline-primary);
    color: #fff;
    box-shadow: 0 0 0 6px color-mix(in srgb, var(--chatonline-primary) 15%, transparent);
}

.chatonline-status-timeline .is-complete,
.chatonline-status-timeline .is-current {
    color: #0f172a;
}

.chatonline-timeline-label {
    max-width: 100%;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.25;
}

.chatonline-cancelled-notice {
    margin-top: 15px;
    padding: 11px 13px;
    border: 1px solid #fecdd3;
    border-radius: 10px;
    background: #fff1f2;
    color: #be123c;
    font-size: 13px;
    font-weight: 800;
}

.chatonline-tracking-actions,
.chatonline-success-actions {
    margin-top: 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chatonline-secondary-action,
.chatonline-success-actions button {
    min-height: 40px;
    padding: 9px 13px;
    border: 1px solid #cbd5e1;
    border-radius: 9px;
    background: #fff;
    color: #334155;
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
}

.chatonline-action-feedback {
    min-height: 18px;
    margin: 7px 0 0;
    font-size: 12px;
}

.chatonline-action-feedback.is-success { color: #08733e; }
.chatonline-action-feedback.is-error { color: #b42318; }

.chatonline-after-submit {
    padding: clamp(22px, 5vw, 38px);
    text-align: center;
}

.chatonline-success-icon {
    width: 74px;
    height: 74px;
    margin: 0 auto 17px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #dcfce7;
    color: #15803d;
    font-size: 34px;
    font-weight: 900;
}

.chatonline-protocol-box {
    width: min(100%, 480px);
    margin: 20px auto 0;
    padding: 10px 10px 10px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border: 2px dashed color-mix(in srgb, var(--chatonline-primary) 45%, #cbd5e1);
    border-radius: 12px;
    background: #f8fafc;
}

.chatonline-protocol-box code {
    overflow-wrap: anywhere;
    color: #0f172a;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: clamp(14px, 3vw, 18px);
    font-weight: 900;
}

.chatonline-protocol-box button {
    min-height: 38px;
    padding: 8px 12px;
    border: 0;
    border-radius: 8px;
    background: var(--chatonline-primary);
    color: #fff;
    font: inherit;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
}

.chatonline-after-submit .chatonline-client-push-box {
    margin-top: 22px;
    text-align: left;
}

.chatonline-client-push-box[hidden] {
    display: none !important;
}

.chatonline-success-actions {
    justify-content: center;
}

.chatonline-success-actions button:first-child {
    border-color: var(--chatonline-primary);
    color: var(--chatonline-primary);
}

.chatonline-install-dialog[hidden] {
    display: none !important;
}

.chatonline-install-dialog {
    position: fixed;
    z-index: 999999;
    inset: 0;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 16px;
}

.chatonline-install-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2, 6, 23, .62);
    backdrop-filter: blur(3px);
}

.chatonline-install-panel {
    position: relative;
    z-index: 1;
    width: min(100%, 460px);
    padding: 28px 24px calc(24px + env(safe-area-inset-bottom, 0px));
    border-radius: 24px 24px 18px 18px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(2, 6, 23, .30);
    text-align: center;
}

.chatonline-install-close {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 999px;
    background: #f1f5f9;
    color: #334155;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
}

.chatonline-install-icon {
    width: 66px;
    height: 66px;
    margin: 0 auto 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    background: color-mix(in srgb, var(--chatonline-primary) 12%, #fff);
    color: var(--chatonline-primary);
}

.chatonline-install-icon .chatonline-label-icon {
    width: 30px;
    height: 30px;
    flex-basis: 30px;
    color: currentColor;
}

.chatonline-install-panel h2 {
    margin: 0;
    color: #0f172a;
    font-size: 24px;
}

.chatonline-install-panel p {
    margin: 10px 0 20px;
    color: #526078;
    line-height: 1.55;
}

.chatonline-install-primary,
.chatonline-install-secondary {
    width: 100%;
    min-height: 48px;
    border-radius: 11px;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.chatonline-install-primary {
    border: 0;
    background: var(--chatonline-primary);
    color: #fff;
}

.chatonline-install-secondary {
    margin-top: 9px;
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #475569;
}

html.chatonline-dialog-open,
html.chatonline-dialog-open body {
    overflow: hidden;
}

@media (min-width: 700px) {
    .chatonline-install-dialog {
        align-items: center;
    }

    .chatonline-install-panel {
        border-radius: 24px;
    }
}

@media (max-width: 620px) {
    .chatonline-header-actions {
        min-width: 0;
        justify-content: center;
    }

    .chatonline-install-button {
        min-height: 38px;
        padding: 7px 12px;
    }

    .chatonline-section-heading {
        align-items: stretch;
        flex-direction: column;
        gap: 5px;
    }

    .chatonline-clear-history {
        align-self: flex-start;
        padding-left: 0;
    }

    .chatonline-status-timeline {
        margin-top: 20px;
        grid-template-columns: 1fr;
        gap: 0;
    }

    .chatonline-status-timeline li {
        min-height: 56px;
        flex-direction: row;
        justify-content: flex-start;
        gap: 12px;
        text-align: left;
    }

    .chatonline-status-timeline li:not(:last-child)::after {
        top: 34px;
        left: 15px;
        width: 3px;
        height: calc(100% - 2px);
    }

    .chatonline-timeline-label {
        font-size: 13px;
    }

    .chatonline-tracking-actions,
    .chatonline-success-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .chatonline-secondary-action,
    .chatonline-success-actions button {
        width: 100%;
    }

    .chatonline-protocol-box {
        align-items: stretch;
        flex-direction: column;
        padding: 14px;
    }

    .chatonline-protocol-box button {
        width: 100%;
    }

    .chatonline-sticky-submit {
        margin-right: -8px;
        margin-left: -8px;
    }
}

@supports not (color: color-mix(in srgb, red 50%, white)) {
    .chatonline-install-button,
    .chatonline-recent-icon,
    .chatonline-install-icon {
        background: #eef4ff;
    }

    .chatonline-protocol-box {
        border-color: #94a3b8;
    }
}


/* === ALIASES PARA TEMPLATES PERSONALIZADOS === */
.ordem-servico-submit {
    background: var(--os-brand);
    border-radius: var(--os-radius);
    transition: filter .2s ease, transform .15s ease, box-shadow .2s ease;
}

.ordem-servico-submit:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px color-mix(in srgb, var(--os-brand) 28%, transparent);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--os-brand);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--os-brand) 14%, transparent);
}

.ordem-servico-message-success {
    border-left: 3px solid hsl(150 38% 46%);
    background: hsl(150 24% 96%);
    color: hsl(150 28% 24%);
}

.ordem-servico-message-error {
    border-left: 3px solid hsl(5 48% 52%);
    background: hsl(5 20% 96%);
    color: hsl(5 28% 28%);
}
