.wagood-os-app,
.wagood-os-app * {
    box-sizing: border-box;
}

body.wagood-official-support-page .entry-header,
body.wagood-official-support-page .entry-title,
body.wagood-official-support-page .page-title,
body.wagood-official-support-page .ast-single-entry-banner {
    display: none !important;
}

.wagood-os-app {
    --os-navy: #071b49;
    --os-blue: #1557d6;
    --os-blue-2: #2770ee;
    --os-orange: #ff9f0a;
    --os-ink: #071b49;
    --os-muted: #66758f;
    --os-line: #d8e5fb;
    --os-soft: #eef6ff;
    width: min(1180px, calc(100% - 32px));
    min-height: calc(100vh - 150px);
    margin: 36px auto;
    color: var(--os-ink);
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.wagood-os-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 24px 28px;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 26px 26px 0 0;
    background:
        radial-gradient(circle at 90% 0, rgba(15, 203, 204, .38), transparent 38%),
        linear-gradient(125deg, #071b49 0%, #143f91 66%, #087f91 100%);
    box-shadow: 0 20px 54px rgba(7, 27, 73, .22);
}

.wagood-os-brand {
    display: flex;
    align-items: center;
    gap: 16px;
}

.wagood-os-mark {
    display: grid;
    width: 54px;
    height: 54px;
    flex: 0 0 54px;
    place-items: center;
    border-radius: 18px;
    color: #fff;
    background: linear-gradient(145deg, #2384ef, #0f99a4);
    font-size: 26px;
    font-weight: 900;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25);
}

.wagood-os-brand small {
    display: block;
    margin: 0 0 4px;
    color: #ffc95e;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .12em;
}

.wagood-os-brand h1 {
    margin: 0 !important;
    color: #fff !important;
    font-family: inherit !important;
    font-size: clamp(25px, 3vw, 38px) !important;
    font-weight: 900 !important;
    line-height: 1.08 !important;
}

.wagood-os-brand p {
    margin: 7px 0 0;
    color: #d9e9ff;
    font-size: 14px;
}

.wagood-os-back {
    flex: 0 0 auto;
    padding: 12px 19px;
    border: 1px solid rgba(255, 255, 255, .3);
    border-radius: 999px;
    color: #fff !important;
    background: rgba(255, 255, 255, .11);
    font-weight: 800;
    text-decoration: none !important;
}

.wagood-os-back:hover {
    color: #071b49 !important;
    background: #fff;
}

.wagood-os-shell {
    display: grid;
    grid-template-rows: auto auto minmax(380px, 1fr) auto;
    min-height: min(720px, calc(100vh - 210px));
    overflow: hidden;
    border: 1px solid #cbdcf6;
    border-top: 0;
    border-radius: 0 0 26px 26px;
    background: #fff;
    box-shadow: 0 24px 60px rgba(7, 27, 73, .14);
}

.wagood-os-identity {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) minmax(180px, .55fr) minmax(220px, .7fr);
    align-items: end;
    gap: 16px;
    padding: 18px 22px;
    border-bottom: 1px solid #ffdaa0;
    background: #fff8ec;
}

.wagood-os-identity[hidden] {
    display: none;
}

.wagood-os-identity strong {
    display: block;
    font-size: 16px;
}

.wagood-os-identity p {
    margin: 4px 0 0;
    color: #735117;
    font-size: 13px;
}

.wagood-os-identity label,
.wagood-os-complaint-fields label {
    display: grid;
    gap: 6px;
    color: #263a60;
    font-size: 12px;
    font-weight: 800;
}

.wagood-os-identity input,
.wagood-os-complaint-fields input,
.wagood-os-complaint-fields select,
.wagood-os-topic-row select {
    width: 100%;
    min-height: 42px;
    padding: 9px 12px;
    border: 1px solid #bdd1f3;
    border-radius: 12px;
    outline: 0;
    color: #071b49;
    background: #fff;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
}

.wagood-os-identity input:focus,
.wagood-os-complaint-fields input:focus,
.wagood-os-complaint-fields select:focus,
.wagood-os-topic-row select:focus {
    border-color: #2770ee;
    box-shadow: 0 0 0 3px rgba(39, 112, 238, .12);
}

.wagood-os-official-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 22px;
    border-bottom: 1px solid var(--os-line);
    background: #fff;
}

.wagood-os-shield {
    display: grid;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    place-items: center;
    border-radius: 13px;
    color: #fff;
    background: linear-gradient(145deg, #1557d6, #087f91);
    font-weight: 900;
}

.wagood-os-official-row strong,
.wagood-os-official-row small {
    display: block;
}

.wagood-os-official-row strong {
    font-size: 15px;
}

.wagood-os-official-row small {
    margin-top: 2px;
    color: var(--os-muted);
    font-size: 12px;
}

.wagood-os-online {
    margin-left: auto;
    padding: 6px 10px;
    border-radius: 999px;
    color: #087044;
    background: #e5f9ef;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.wagood-os-cases:empty {
    display: none;
}

.wagood-os-cases {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 10px 18px;
    border-bottom: 1px solid var(--os-line);
    background: #f8fbff;
}

.wagood-os-case-chip {
    min-width: 240px;
    padding: 10px 12px;
    border: 1px solid #bdd2f7;
    border-radius: 13px;
    background: #fff;
}

.wagood-os-case-chip strong,
.wagood-os-case-chip span {
    display: block;
}

.wagood-os-case-chip strong {
    font-size: 13px;
}

.wagood-os-case-chip span {
    margin-top: 3px;
    color: var(--os-muted);
    font-size: 11px;
}

.wagood-os-case-chip em {
    display: inline-block;
    margin-top: 6px;
    padding: 3px 7px;
    border-radius: 999px;
    color: #0c4ec4;
    background: #eaf2ff;
    font-size: 10px;
    font-style: normal;
    font-weight: 900;
    text-transform: uppercase;
}

.wagood-support-chat-log {
    min-height: 380px;
    max-height: calc(100vh - 410px);
    overflow: auto;
    padding: 24px;
    background:
        radial-gradient(circle at 90% 10%, rgba(39, 112, 238, .06), transparent 30%),
        #eef6ff;
    scroll-behavior: smooth;
}

.wagood-os-loading,
.wagood-os-empty {
    display: grid;
    min-height: 260px;
    place-items: center;
    color: var(--os-muted);
    text-align: center;
    font-weight: 700;
}

.wagood-support-chat-bubble {
    width: fit-content;
    max-width: min(72%, 690px);
    margin: 0 0 14px;
    padding: 11px 14px;
    border: 1px solid #d8e4f4;
    border-radius: 6px 18px 18px;
    color: var(--os-ink);
    background: #fff;
    box-shadow: 0 5px 18px rgba(7, 27, 73, .06);
}

.wagood-support-chat-bubble.is-customer {
    margin-left: auto;
    border-color: #2362d7;
    border-radius: 18px 6px 18px 18px;
    color: #fff;
    background: linear-gradient(145deg, #246fee, #174ec7);
}

.wagood-support-chat-bubble.is-system {
    margin-right: auto;
    margin-left: auto;
    border: 0;
    color: #53647f;
    background: rgba(255, 255, 255, .66);
    box-shadow: none;
    text-align: center;
}

.wagood-support-chat-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 5px;
    color: #456085;
    font-size: 11px;
    font-weight: 800;
}

.wagood-support-chat-bubble.is-customer .wagood-support-chat-meta {
    color: #dce8ff;
}

.wagood-support-chat-text {
    overflow-wrap: anywhere;
    font-size: 14px;
    line-height: 1.55;
    white-space: pre-wrap;
}

.wagood-os-images {
    display: grid;
    grid-template-columns: repeat(2, minmax(80px, 190px));
    gap: 8px;
    margin-top: 9px;
}

.wagood-os-images a {
    display: block;
    overflow: hidden;
    border-radius: 10px;
    background: #dce9fb;
}

.wagood-os-images img {
    display: block;
    width: 100%;
    height: 145px;
    object-fit: cover;
}

.wagood-os-inline-case {
    min-width: min(460px, 100%);
    margin-top: 10px;
    padding: 11px;
    border: 1px solid rgba(255, 255, 255, .4);
    border-radius: 12px;
    background: rgba(0, 22, 70, .2);
}

.wagood-os-inline-case strong,
.wagood-os-inline-case span {
    display: block;
}

.wagood-os-inline-case span {
    margin-top: 3px;
    font-size: 12px;
}

.wagood-os-compose {
    padding: 14px 18px 18px;
    border-top: 1px solid var(--os-line);
    background: #fff;
}

.wagood-os-topic-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.wagood-os-topic-row label {
    color: #33496c;
    font-size: 12px;
    font-weight: 800;
}

.wagood-os-topic-row select {
    width: auto;
    min-width: 180px;
    min-height: 36px;
    padding: 7px 34px 7px 11px;
}

.wagood-os-complaint-fields {
    display: grid;
    grid-template-columns: 1.15fr 1fr 1fr;
    gap: 10px;
    margin: 0 0 10px;
    padding: 12px;
    border: 1px solid #ffcf83;
    border-radius: 14px;
    background: #fff9ef;
}

.wagood-os-complaint-fields[hidden] {
    display: none;
}

.wagood-os-complaint-fields label span {
    color: #8b6d3d;
    font-weight: 500;
}

.wagood-os-complaint-fields p {
    grid-column: 1 / -1;
    margin: 0;
    color: #72511e;
    font-size: 11px;
}

.wagood-os-preview {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    margin-bottom: 8px;
}

.wagood-os-preview:empty {
    display: none;
}

.wagood-os-preview-item {
    position: relative;
    width: 66px;
    height: 58px;
    flex: 0 0 66px;
    overflow: hidden;
    border: 1px solid #c5d6ef;
    border-radius: 10px;
    background: #eef5ff;
}

.wagood-os-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wagood-os-preview-item button {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 20px;
    height: 20px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    color: #fff;
    background: #071b49;
    font: 800 12px/20px Arial, sans-serif;
}

.wagood-os-input-row {
    display: grid;
    grid-template-columns: 44px 1fr auto;
    align-items: end;
    gap: 10px;
    padding: 6px;
    border: 1px solid #b9cdf0;
    border-radius: 18px;
    background: #fff;
    transition: .18s ease;
}

.wagood-os-input-row.is-dragging {
    border-color: var(--os-blue);
    background: #eef5ff;
    box-shadow: 0 0 0 4px rgba(21, 87, 214, .12);
}

.wagood-os-attach {
    width: 42px;
    height: 42px;
    padding: 0;
    border: 0;
    border-radius: 13px;
    color: var(--os-blue);
    background: #eaf2ff;
    font: 500 26px/42px Arial, sans-serif;
    cursor: pointer;
}

.wagood-os-input-row textarea {
    width: 100%;
    min-height: 42px;
    max-height: 120px;
    resize: none;
    padding: 10px 5px;
    border: 0;
    outline: 0;
    color: #071b49;
    background: transparent;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
}

.wagood-os-send {
    min-height: 42px;
    padding: 0 20px;
    border: 0;
    border-radius: 13px;
    color: #071b49;
    background: linear-gradient(135deg, #ffbd3f, #ff9000);
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 7px 18px rgba(255, 159, 10, .23);
}

.wagood-os-send:disabled,
.wagood-os-attach:disabled {
    cursor: wait;
    opacity: .55;
}

.wagood-os-error {
    min-height: 16px;
    margin: 7px 4px 0;
    color: #b42318;
    font-size: 12px;
    font-weight: 700;
}

@media (max-width: 760px) {
    body.wagood-official-support-page {
        overflow: hidden !important;
        background: #eef6ff !important;
    }

    body.wagood-official-support-page #masthead,
    body.wagood-official-support-page .site-header,
    body.wagood-official-support-page .ast-mobile-header-wrap,
    body.wagood-official-support-page #colophon,
    body.wagood-official-support-page .site-footer {
        display: none !important;
    }

    body.wagood-official-support-page #page,
    body.wagood-official-support-page #content,
    body.wagood-official-support-page .site-content,
    body.wagood-official-support-page .ast-container,
    body.wagood-official-support-page #primary,
    body.wagood-official-support-page .content-area,
    body.wagood-official-support-page .site-main,
    body.wagood-official-support-page article,
    body.wagood-official-support-page article.page,
    body.wagood-official-support-page .entry-content,
    body.wagood-official-support-page .wp-block-shortcode {
        width: 100% !important;
        max-width: none !important;
        min-height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .wagood-os-app {
        --wagood-mobile-nav-height: 78px;
        display: flex;
        width: 100vw;
        height: calc(100vh - var(--wagood-mobile-nav-height) - env(safe-area-inset-bottom, 0px));
        height: calc(100dvh - var(--wagood-mobile-nav-height) - env(safe-area-inset-bottom, 0px));
        min-height: 0;
        margin: 0 0 0 calc(50% - 50vw);
        padding: 0;
        flex-direction: column;
        overflow: hidden;
    }

    .wagood-os-hero {
        min-width: 0;
        flex: 0 0 auto;
        gap: 8px;
        padding: 10px 12px;
        border-radius: 0;
    }

    .wagood-os-brand {
        min-width: 0;
        gap: 8px;
    }

    .wagood-os-mark {
        width: 36px;
        height: 36px;
        flex-basis: 36px;
        border-radius: 12px;
        font-size: 18px;
    }

    .wagood-os-brand small {
        display: none;
    }

    .wagood-os-brand p {
        display: none;
    }

    .wagood-os-brand h1 {
        overflow: hidden;
        font-size: 17px !important;
        line-height: 1.1 !important;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .wagood-os-back {
        padding: 8px 10px;
        font-size: 11px;
    }

    .wagood-os-shell {
        display: flex;
        min-height: 0;
        flex: 1 1 auto;
        flex-direction: column;
        overflow: hidden;
        border-right: 0;
        border-left: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .wagood-os-identity {
        grid-template-columns: 1fr;
        align-items: stretch;
        flex: 0 0 auto;
        padding: 10px 12px;
    }

    .wagood-os-official-row {
        flex: 0 0 auto;
        gap: 9px;
        padding: 8px 12px;
    }

    .wagood-os-shield {
        width: 34px;
        height: 34px;
        flex-basis: 34px;
        border-radius: 11px;
    }

    .wagood-os-official-row strong {
        font-size: 14px;
    }

    .wagood-os-official-row small {
        font-size: 11px;
    }

    .wagood-os-online {
        display: none;
    }

    .wagood-os-cases {
        flex: 0 0 auto;
        gap: 7px;
        padding: 7px 10px;
    }

    .wagood-os-case-chip {
        min-width: 205px;
        padding: 7px 9px;
    }

    body.wagood-official-support-page #wagood-os-messages.wagood-support-chat-log {
        display: flex;
        min-height: 0;
        max-height: none;
        flex: 1 1 auto;
        flex-direction: column;
        overflow-y: auto;
        padding: 12px 14px !important;
        background: #eef6ff !important;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
    }

    .wagood-os-loading,
    .wagood-os-empty {
        min-height: 100%;
        flex: 1 1 auto;
    }

    body.wagood-official-support-page #wagood-os-messages > [data-wagood-message] {
        all: unset !important;
        box-sizing: border-box !important;
        display: flex !important;
        flex-direction: column !important;
        width: auto !important;
        min-width: 132px !important;
        max-width: calc(100% - 44px) !important;
        margin: 0 0 10px !important;
        padding: 10px 12px !important;
        border: 1px solid #d8e4f4 !important;
        border-radius: 6px 16px 16px !important;
        color: #071b49 !important;
        background: #fff !important;
        box-shadow: 0 5px 16px rgba(7, 27, 73, .08) !important;
        font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
        line-height: 1.4 !important;
        overflow: visible !important;
        text-align: left !important;
    }

    body.wagood-official-support-page #wagood-os-messages > [data-wagood-message] > [data-wagood-part],
    body.wagood-official-support-page #wagood-os-messages > [data-wagood-message] > [data-wagood-part] > [data-wagood-part] {
        all: unset !important;
        box-sizing: border-box !important;
        color: inherit !important;
        background: transparent !important;
    }

    body.wagood-official-support-page #wagood-os-messages > [data-wagood-message] > [data-wagood-part="meta"] {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 10px !important;
        margin-bottom: 4px !important;
        color: #597091 !important;
        font-size: 10px !important;
        font-weight: 800 !important;
        line-height: 1.2 !important;
        white-space: nowrap !important;
    }

    body.wagood-official-support-page #wagood-os-messages [data-wagood-part="sender"],
    body.wagood-official-support-page #wagood-os-messages [data-wagood-part="time"] {
        display: inline !important;
        color: inherit !important;
        font: inherit !important;
        white-space: nowrap !important;
    }

    body.wagood-official-support-page #wagood-os-messages [data-wagood-part="time"] {
        margin-left: auto !important;
    }

    body.wagood-official-support-page #wagood-os-messages > [data-wagood-message] > [data-wagood-part="text"] {
        display: block !important;
        overflow-wrap: anywhere !important;
        color: inherit !important;
        font-size: 14px !important;
        font-weight: 500 !important;
        line-height: 1.42 !important;
        white-space: pre-wrap !important;
    }

    body.wagood-official-support-page #wagood-os-messages > [data-wagood-message="customer"] {
        align-self: flex-end !important;
        margin: 0 0 10px auto !important;
        border-color: #2362d7 !important;
        border-radius: 16px 6px 16px 16px !important;
        color: #fff !important;
        background: linear-gradient(145deg, #246fee, #174ec7) !important;
    }

    body.wagood-official-support-page #wagood-os-messages > [data-wagood-message="customer"] > [data-wagood-part="meta"] {
        color: #dce8ff !important;
    }

    body.wagood-official-support-page #wagood-os-messages > [data-wagood-message="support"] {
        align-self: flex-start !important;
        margin: 0 auto 10px 0 !important;
        color: #071b49 !important;
        background: #fff !important;
    }

    body.wagood-official-support-page #wagood-os-messages > [data-wagood-message="system"] {
        align-self: center !important;
        width: auto !important;
        min-width: 0 !important;
        max-width: 92% !important;
        margin: 0 auto 12px !important;
        border: 1px solid #e5d8b8 !important;
        border-radius: 16px !important;
        color: #68410c !important;
        background: #fffaf0 !important;
        text-align: center !important;
    }

    body.wagood-official-support-page #wagood-os-messages > [data-wagood-message="system"] > [data-wagood-part="text"] {
        font-size: 13px !important;
        line-height: 1.45 !important;
    }

    body.wagood-official-support-page #wagood-os-messages > [data-wagood-message]::before,
    body.wagood-official-support-page #wagood-os-messages > [data-wagood-message]::after,
    body.wagood-official-support-page #wagood-os-messages > [data-wagood-message] > [data-wagood-part]::before,
    body.wagood-official-support-page #wagood-os-messages > [data-wagood-message] > [data-wagood-part]::after,
    body.wagood-official-support-page #wagood-os-messages > [data-wagood-message] > [data-wagood-part] > [data-wagood-part]::before,
    body.wagood-official-support-page #wagood-os-messages > [data-wagood-message] > [data-wagood-part] > [data-wagood-part]::after {
        display: none !important;
        content: none !important;
    }

    .wagood-os-compose {
        position: relative;
        bottom: auto;
        z-index: 4;
        max-height: 48dvh;
        flex: 0 0 auto;
        overflow-y: auto;
        padding: 8px 8px max(9px, env(safe-area-inset-bottom, 0px));
    }

    .wagood-os-topic-row {
        justify-content: space-between;
        margin-bottom: 7px;
    }

    .wagood-os-topic-row label {
        display: none;
    }

    .wagood-os-app .wagood-os-topic-row select {
        width: 100%;
        min-height: 40px;
        padding: 7px 32px 7px 10px;
        font-family: inherit !important;
        font-size: 14px !important;
        font-weight: 800 !important;
        line-height: 1.2 !important;
    }

    .wagood-os-complaint-fields {
        grid-template-columns: 1fr;
        padding: 9px;
    }

    .wagood-os-app .wagood-os-input-row {
        grid-template-columns: 40px minmax(0, 1fr) 64px;
        align-items: center;
        gap: 5px;
        padding: 4px;
        border-radius: 16px;
    }

    .wagood-os-app .wagood-os-attach {
        width: 40px;
        height: 40px;
        line-height: 40px;
    }

    .wagood-os-app .wagood-os-input-row textarea {
        width: 100%;
        min-width: 0;
        height: 40px;
        min-height: 40px;
        max-height: 84px;
        overflow-y: auto;
        padding: 9px 5px;
        font-size: 14px;
        line-height: 1.4;
    }

    .wagood-os-app .wagood-os-send {
        width: 64px;
        min-width: 64px;
        min-height: 40px;
        padding: 0 8px;
    }
}
