/* Public Cody panel: compact dark branding with native dialog focus management. */
.cody-launcher {
    position:fixed;
    right:24px;
    bottom:88px;
    z-index:1040;
    border:1px solid #ff650b;
    border-radius:30px;
    background:#ff650b;
    color:#0c0e15;
    padding:12px 20px;
    font-family:inherit;
    font-size:14px;
    font-weight:600;
    box-shadow:0 8px 32px #0006;
}

.cody-launcher i {
    margin-right:8px;
}

.cody-dialog {
    position:fixed;
    inset:auto 24px 148px auto;
    width:380px;
    max-width:calc(100vw - 32px);
    max-height:calc(100dvh - 164px);
    margin:0;
    padding:0;
    border:1px solid #35394b;
    border-radius:16px;
    background:#151822;
    color:#f5f6fa;
    box-shadow:0 18px 70px #0009;
    font-size:14px;
    overflow:hidden;
    height:520px;
}

.cody-dialog[open] { display:flex; flex-direction:column; }

.cody-header,.cody-footer { flex-shrink:0; }

.cody-dialog::backdrop {
    background:#0005;
}

.cody-header {
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:18px;
    border-bottom:1px solid #2a2d3b;
}

.cody-identity {
    display:flex;
    align-items:center;
    gap:12px;
}

.cody-avatar {
    display:grid;
    place-items:center;
    width:38px;
    height:38px;
    border-radius:10px;
    background:#ff650b;
    color:#0c0e15;
    font-weight:800;
}

.cody-header h2 {
    font-size:18px;
    margin:0 0 2px;
}

.cody-header span:not(.cody-avatar) {
    font-size:12px;
    color:#a5a9ba;
}

.cody-close {
    border:0;
    background:transparent;
    color:#c8ccda;
    font-size:27px;
    width:44px;
    height:44px;
    line-height:1;
    border-radius:8px;
}

.cody-body {
    flex:1;
    min-height:0;
    overflow-y:auto;
    padding:20px;
}

.cody-body p {
    line-height:1.6;
}

.cody-topics {
    display:flex;
    flex-wrap:wrap;
    gap:8px;
    margin:18px 0;
}

.cody-topics button {
    border:1px solid #45495b;
    border-radius:18px;
    background:#202431;
    color:#f5f6fa;
    padding:10px 13px;
    font-size:12px;
    min-height:44px;
}

.cody-topics button:hover {
    border-color:#ff650b;
    background:#33271f;
}

.cody-answer {
    background:#202431;
    border-left:3px solid #ff650b;
    padding:12px;
    border-radius:4px;
    margin:18px 0;
}

.cody-contact {
    font-size:13px;
    padding:10px 16px;
}

.cody-footer {
    border-top:1px solid #2a2d3b;
    padding:12px 20px;
    font-size:11px;
    color:#a5a9ba;
    line-height:1.5;
}

.cody-dialog button:focus-visible,.cody-dialog a:focus-visible,.cody-launcher:focus-visible {
    outline:2px solid #ff9c61;
    outline-offset:3px;
}

[data-cody-open][hidden],.cody-answer[hidden] {
    display:none!important;
}

@media(max-width:575px) {
    .cody-launcher {
        right:16px;
        bottom:16px;
        padding:11px 16px;
    }
    .cody-dialog {
        right:16px;
        bottom:16px;
        width:calc(100vw - 32px);
        max-height:calc(100dvh - 32px);
    }
    .approved-copy h1 {
        font-size:clamp(36px,9vw,52px);
    }
    .site-footer {
        padding-bottom:84px;
    }
}

/* Keep the heading and close control visible on landscape screens and at browser zoom. */
@media(max-height:700px) {
    .cody-dialog {
        inset:auto 16px 16px auto;
        max-height:calc(100dvh - 32px);
    }
}

.cody-avatar { background:transparent; object-fit:contain; }
.cody-form { margin:0; font-size:14px; }
.cody-form label { display:block; margin-bottom:6px; font-weight:600; }
.cody-question-row { display:flex; gap:8px; }
.cody-question-row input {
    min-width:0; flex:1; padding:8px 10px; border:1px solid #45495b;
    border-radius:6px; background:#0c0e15; color:#f5f6fa; font:inherit;
}
.cody-question-row button { padding:8px 12px; font-size:13px; min-height:44px; }
.cody-question-row input:focus-visible { outline:2px solid #ff9c61; outline-offset:2px; }
.cody-challenge { line-height:0; }
.cody-notice { font-size:11px; color:#b7bbcb; margin:8px 0; }
.cody-form [disabled] { opacity:.6; }

/* Keep flex content inside narrow dialogs and avoid iOS text-input auto zoom. */
.cody-dialog { box-sizing:border-box; min-width:0; }
.cody-header,.cody-body,.cody-footer,.cody-form,.cody-question-row { min-width:0; max-width:100%; box-sizing:border-box; }
.cody-body { overflow-wrap:anywhere; }
.cody-close,.cody-question-row button { flex-shrink:0; }
.cody-question-row input { width:0; font-size:16px; }
