/* ───────────────────────────────────────────────
   Feedback / support chat widget (johnontabor.com)
   Self-contained — prefixed .gtf- to avoid clashes.
   ─────────────────────────────────────────────── */
.gtf-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 10px 15px;
    background: rgba(11, 16, 28, 0.82);
    border: 1px solid rgba(77, 141, 255, 0.28);
    border-radius: 999px;
    color: #4d8dff;
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    font-size: 0.84rem;
    font-weight: 600;
    cursor: pointer;
    z-index: 1000;
    box-shadow: 0 8px 28px -8px rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(10px) saturate(130%);
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.gtf-btn:hover {
    background: rgba(11, 16, 28, 0.95);
    border-color: rgba(77, 141, 255, 0.55);
    transform: translateY(-2px);
    box-shadow: 0 12px 32px -8px rgba(77, 141, 255, 0.25);
}

.gtf-btn svg { width: 19px; height: 19px; flex-shrink: 0; }

.gtf-btn .gtf-badge {
    position: absolute;
    top: -6px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    background: #f43f5e;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    line-height: 18px;
    text-align: center;
    display: none;
}

.gtf-btn .gtf-badge.show { display: block; }

/* Panel */
.gtf-panel {
    position: fixed;
    bottom: 84px;
    right: 20px;
    width: 370px;
    max-width: calc(100vw - 32px);
    height: 520px;
    max-height: calc(100vh - 120px);
    background: linear-gradient(180deg, rgba(20, 26, 40, 0.98), rgba(12, 17, 28, 0.98));
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    box-shadow: 0 24px 64px -16px rgba(0, 0, 0, 0.75);
    z-index: 1001;
    display: none;
    flex-direction: column;
    overflow: hidden;
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

.gtf-panel.open { display: flex; animation: gtfIn 0.2s ease; }

@keyframes gtfIn {
    from { transform: translateY(16px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.gtf-head {
    padding: 15px 17px;
    background: rgba(77, 141, 255, 0.08);
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.gtf-head h4 { margin: 0; font-size: 15px; color: #fff; font-weight: 700; letter-spacing: -0.2px; }
.gtf-head p { margin: 2px 0 0; font-size: 11px; color: #6b7886; }

.gtf-close {
    background: none;
    border: none;
    color: #9aa7b2;
    font-size: 22px;
    cursor: pointer;
    line-height: 1;
    padding: 0 2px;
    border-radius: 6px;
}

.gtf-close:hover { color: #fff; }

.gtf-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.gtf-body::-webkit-scrollbar { width: 7px; }
.gtf-body::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.12); border-radius: 4px; }

.gtf-msg {
    max-width: 80%;
    padding: 8px 12px;
    border-radius: 14px;
    font-size: 13px;
    line-height: 1.45;
}

.gtf-msg.user {
    align-self: flex-end;
    background: #4d8dff;
    color: #fff;
    border-bottom-right-radius: 4px;
}

.gtf-msg.admin {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.06);
    color: #e8edf2;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-bottom-left-radius: 4px;
}

.gtf-msg-text { display: block; white-space: pre-wrap; word-break: break-word; }
.gtf-msg-time { font-size: 10px; opacity: 0.6; margin-top: 4px; display: block; }
.gtf-sysnote { text-align: center; font-size: 11px; color: #5a6672; padding: 4px; }

.gtf-empty { margin: auto; text-align: center; color: #6b7886; padding: 20px; }
.gtf-empty .gtf-emoji { font-size: 34px; display: block; margin-bottom: 10px; }
.gtf-empty h5 { margin: 0 0 6px; color: #eaf1ff; font-size: 14px; }
.gtf-empty p { margin: 0 0 14px; font-size: 12.5px; line-height: 1.5; }

.gtf-discord-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #5865F2;
    color: #fff;
    text-decoration: none;
    padding: 10px 18px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 13px;
    transition: background 0.2s;
}

.gtf-discord-btn:hover { background: #4752c4; }

.gtf-foot {
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    padding: 10px;
    display: flex;
    gap: 8px;
    align-items: flex-end;
}

.gtf-input-wrap { flex: 1; position: relative; display: flex; }

.gtf-input-wrap textarea {
    flex: 1;
    resize: none;
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: #fff;
    font-family: inherit;
    font-size: 13px;
    line-height: 1.3;
    padding: 9px 12px;
    height: 38px;
    min-height: 38px;
    max-height: 90px;
    outline: none;
}

.gtf-count {
    position: absolute;
    bottom: 4px;
    right: 8px;
    font-size: 10px;
    color: #5a6672;
    pointer-events: none;
    background: rgba(12, 17, 28, 0.9);
    padding: 0 3px;
    border-radius: 3px;
}

.gtf-count.over { color: #fb7185; font-weight: 700; }

.gtf-input-wrap textarea:focus {
    border-color: rgba(77, 141, 255, 0.45);
    box-shadow: 0 0 0 3px rgba(77, 141, 255, 0.12);
}

.gtf-send {
    background: #4d8dff;
    color: #fff;
    border: none;
    border-radius: 10px;
    width: 38px;
    height: 38px;
    cursor: pointer;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease, opacity 0.15s ease;
}

.gtf-send:hover { background: #5c98ff; }
.gtf-send:disabled { opacity: 0.4; cursor: not-allowed; }
.gtf-err { color: #fb7185; font-size: 11.5px; padding: 0 12px 6px; }
