/* ============================================================
   PDF Synapse — Claude-style UI
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Lora:ital@0;1&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #f0f0f8;
  --surface: #ffffff;
  --border: #e2e2ee;
  --text: #18181f;
  --muted: #71718a;
  --accent: #023844;
  --accent-h: #035a6b;
  --sidebar-w: 240px;
  --radius: 14px;
  --shadow: 0 2px 20px rgba(0,0,0,.07);
}

#uac-app {
  display: flex;
  height: 100vh;
  min-height: 580px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
}

/* ── Sidebar ─────────────────────────────────────────────── */
.uac-sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: #e8e8f4;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 18px 14px;
  gap: 20px;
}
.uac-sidebar-top { display: flex; flex-direction: column; gap: 10px; }
.uac-logo {
  display: flex; align-items: center; gap: 10px;
  font-family: 'Lora', serif;
  font-size: 17px;
  color: var(--text);
  padding: 4px 4px;
}
.uac-new-btn {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 9px 13px;
  font-size: 13px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  transition: background .14s;
}
.uac-new-btn:hover { background: var(--border); }
.uac-sidebar-mid { flex: 1; overflow-y: auto; }
.uac-sidebar-label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .07em; font-weight: 600; margin-bottom: 8px; padding: 0 4px; }
.uac-history-list { display: flex; flex-direction: column; gap: 2px; }
.uac-history-empty { font-size: 12px; color: var(--muted); padding: 6px 4px; }
.uac-history-item { padding: 8px 10px; border-radius: 8px; font-size: 13px; cursor: pointer; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: background .12s; }
.uac-history-item:hover { background: rgba(0,0,0,.06); }
.uac-sidebar-bottom { margin-top: auto; }
.uac-user-row { display: flex; align-items: center; gap: 9px; padding: 8px 4px; font-size: 13px; font-weight: 500; }
.uac-avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; flex-shrink: 0; }
.uac-signin-btn { width: 100%; padding: 9px 13px; background: var(--accent); color: #fff; border: none; border-radius: 9px; font-family: 'Plus Jakarta Sans', sans-serif; font-size: 13px; font-weight: 600; cursor: pointer; transition: background .14s; }
.uac-signin-btn:hover { background: var(--accent-h); }

/* ── Main ─────────────────────────────────────────────────── */
.uac-main { flex: 1; display: flex; flex-direction: column; overflow: hidden; }

/* ── Welcome ─────────────────────────────────────────────── */
.uac-welcome { flex: 1; display: flex; align-items: center; justify-content: center; padding: 24px 32px; overflow-y: auto; }
.uac-welcome-inner { width: 100%; max-width: 960px; text-align: center; }
.uac-headline {
  font-family: 'Lora', serif;
  font-size: clamp(26px, 4vw, 36px) !important;
  line-height: 1.2;
  color: var(--text);
  margin-bottom: 12px;
}
.uac-subline { font-size: 15px; color: var(--muted); margin-bottom: 28px; line-height: 1.6; }

/* ── Card ─────────────────────────────────────────────────── */
.uac-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; text-align: left; }

/* Category row */
.uac-category-row { padding: 22px 28px 0; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.uac-cat-label { font-size: 13px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.uac-cat-select { flex: 1; min-width: 180px; padding: 8px 12px; border: 1px solid var(--border); border-radius: 8px; font-family: 'Plus Jakarta Sans', sans-serif; font-size: 13px; color: var(--text); background: var(--bg); outline: none; cursor: pointer; transition: border-color .14s; }
.uac-cat-select:focus { border-color: var(--accent); }

/* Tabs */
.uac-tabs { display: flex; border-bottom: 1px solid var(--border); padding: 8px 8px 0; gap: 2px; margin-top: 12px; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.uac-tabs::-webkit-scrollbar { display: none; }
.uac-tab { display: flex; align-items: center; gap: 7px; padding: 9px 16px; border: none; background: transparent; font-family: 'Plus Jakarta Sans', sans-serif; font-size: 13px; font-weight: 500; color: var(--muted); cursor: pointer; border-radius: 8px 8px 0 0; border-bottom: 2px solid transparent; transition: all .14s; white-space: nowrap; flex-shrink: 0; }
.uac-tab:hover { color: var(--text); background: var(--bg); }
.uac-tab-active { color: var(--accent) !important; border-bottom-color: var(--accent) !important; background: transparent !important; }

/* Panel */
.uac-panel { padding: 28px 28px; }

/* Drop zones */
.uac-drop-row { display: grid; grid-template-columns: 1fr 36px 1fr; gap: 10px; align-items: center; margin-bottom: 18px; }
.uac-drop-zone { position: relative; border: 2px dashed var(--border); border-radius: 10px; min-height: 160px; display: flex; align-items: center; justify-content: center; flex-direction: column; background: var(--bg); overflow: hidden; transition: border-color .14s, background .14s; }
.uac-drop-zone:hover { border-color: var(--accent); background: #f5f5ff; }
.uac-drop-zone.uac-drag-over { border-color: var(--accent); background: #eeeeff; }
.uac-drop-zone.uac-uploaded { border-style: solid; border-color: #22c55e; background: #f0fdf4; }
.uac-file-input { position: absolute; inset: 0; opacity: 0; cursor: pointer; z-index: 2; width: 100%; height: 100%; }
.uac-drop-inner { display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--muted); padding: 14px; pointer-events: none; }
.uac-drop-title { font-size: 13px; font-weight: 600; color: var(--text); }
.uac-drop-hint { font-size: 11px; color: var(--muted); }
.uac-file-badge { display: flex; align-items: center; gap: 7px; padding: 8px 10px; background: #dcfce7; border-radius: 8px; font-size: 12px; font-weight: 500; color: #15803d; width: calc(100% - 20px); margin: 0 10px; }
.uac-badge-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.uac-badge-remove { background: none; border: none; font-size: 17px; line-height: 1; cursor: pointer; color: #15803d; z-index: 3; position: relative; flex-shrink: 0; }
.uac-prog-wrap { position: absolute; bottom: 0; left: 0; right: 0; height: 3px; background: var(--border); }
.uac-prog-fill { height: 100%; width: 0%; background: var(--accent); transition: width .2s; }
.uac-vs { text-align: center; font-size: 11px; font-weight: 700; letter-spacing: .07em; color: var(--muted); }

/* URL row */
.uac-url-row { display: grid; grid-template-columns: 1fr 36px 1fr; gap: 10px; align-items: end; margin-bottom: 18px; }
.uac-url-field label { display: block; font-size: 11px; font-weight: 600; color: var(--muted); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .05em; }
.uac-url-wrap { display: flex; align-items: center; border: 1px solid var(--border); border-radius: 9px; background: var(--bg); overflow: hidden; transition: border-color .14s; }
.uac-url-wrap:focus-within { border-color: var(--accent); }
.uac-url-wrap svg { margin-left: 11px; flex-shrink: 0; color: var(--muted); }
.uac-url-input { flex: 1; padding: 11px 11px; border: none; background: transparent; font-family: 'Plus Jakarta Sans', sans-serif; font-size: 13px; color: var(--text); outline: none; }
.uac-url-input::placeholder { color: var(--muted); }
.uac-url-clear { padding: 0 11px; background: none; border: none; font-size: 17px; color: var(--muted); cursor: pointer; line-height: 1; }

/* Submit */
.uac-submit-row { display: flex; justify-content: center; }
.uac-submit-btn { display: flex; align-items: center; gap: 9px; padding: 11px 22px; background: var(--accent); color: #fff; border: none; border-radius: 10px; font-family: 'Plus Jakarta Sans', sans-serif; font-size: 13px; font-weight: 600; cursor: pointer; transition: background .14s, opacity .14s; }
.uac-submit-btn:hover:not(:disabled) { background: var(--accent-h); }
.uac-submit-btn:disabled { opacity: .4; cursor: not-allowed; }
.uac-dots { display: inline-flex; gap: 4px; align-items: center; }
.uac-dots span { width: 5px; height: 5px; border-radius: 50%; background: rgba(255,255,255,.8); animation: uac-bounce .8s infinite; }
.uac-dots span:nth-child(2) { animation-delay: .15s; }
.uac-dots span:nth-child(3) { animation-delay: .3s; }
@keyframes uac-bounce { 0%,80%,100% { transform: scale(1); opacity:.6; } 40% { transform: scale(1.4); opacity:1; } }
.uac-disclaimer { font-size: 11px; color: var(--muted); margin-top: 14px; line-height: 1.5; }

/* ── Chat screen ─────────────────────────────────────────── */
.uac-chat-screen { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.uac-chat-topbar { display: flex; align-items: center; justify-content: space-between; padding: 13px 24px; border-bottom: 1px solid var(--border); background: var(--surface); }
.uac-chat-meta { display: flex; align-items: center; gap: 12px; }
#uac-chat-title { font-size: 14px; font-weight: 600; color: var(--text); }
.uac-score-pill { background: #ede9fe; color: #5b21b6; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 20px; }
.uac-new-top-btn { display: flex; align-items: center; gap: 6px; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 7px 12px; font-size: 12px; font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 500; color: var(--text); cursor: pointer; transition: background .12s; }
.uac-new-top-btn:hover { background: var(--border); }

/* Messages */
.uac-messages { flex: 1; overflow-y: auto; padding: 28px 0; display: flex; flex-direction: column; gap: 22px; }
.uac-messages::-webkit-scrollbar { width: 5px; }
.uac-messages::-webkit-scrollbar-track { background: transparent; }
.uac-messages::-webkit-scrollbar-thumb { background: var(--border); border-radius: 99px; }
.uac-msg { max-width: 700px; width: 90%; animation: uac-fadein .22s ease; }
@keyframes uac-fadein { from { opacity:0; transform: translateY(6px); } to { opacity:1; transform: none; } }
.uac-msg-user { align-self: flex-end; margin-right: 5%; }
.uac-msg-assistant { align-self: flex-start; margin-left: 5%; }
.uac-msg-user .uac-bubble { background: var(--accent); color: #fff; border-radius: 18px 18px 4px 18px; padding: 12px 17px; font-size: 14px; line-height: 1.6; }
.uac-msg-assistant .uac-msg-hdr { display: flex; align-items: center; gap: 9px; margin-bottom: 7px; }
.uac-ai-icon { width: 27px; height: 27px; border-radius: 7px; background: var(--accent); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.uac-ai-name { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.uac-msg-body { font-size: 14px; line-height: 1.75; color: var(--text); padding-left: 36px; }
.uac-msg-body h1,.uac-msg-body h2,.uac-msg-body h3 { font-family: 'Lora', serif; margin: 16px 0 7px; color: var(--text); }
.uac-msg-body h2 { font-size: 17px; }
.uac-msg-body h3 { font-size: 15px; }
.uac-msg-body strong { font-weight: 600; }
.uac-msg-body ul,.uac-msg-body ol { padding-left: 20px; margin: 8px 0; }
.uac-msg-body li { margin-bottom: 4px; }
.uac-msg-body table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 13px; }
.uac-msg-body th { background: var(--bg); padding: 8px 12px; text-align: left; font-weight: 600; border: 1px solid var(--border); }
.uac-msg-body td { padding: 7px 12px; border: 1px solid var(--border); }
.uac-msg-body tr:nth-child(even) td { background: #f8f8fc; }
.uac-typing { padding-left: 36px; display: flex; gap: 5px; align-items: center; }
.uac-typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: uac-bounce .8s infinite; }
.uac-typing span:nth-child(2) { animation-delay: .15s; }
.uac-typing span:nth-child(3) { animation-delay: .3s; }

/* Chat footer */
.uac-chat-footer { padding: 14px 24px 18px; border-top: 1px solid var(--border); background: var(--surface); }
.uac-input-box { display: flex; align-items: flex-end; gap: 10px; background: var(--bg); border: 1px solid var(--border); border-radius: 11px; padding: 9px 11px; transition: border-color .14s; }
.uac-input-box:focus-within { border-color: var(--accent); }
.uac-chat-textarea { flex: 1; border: none; background: transparent; font-family: 'Plus Jakarta Sans', sans-serif; font-size: 14px; color: var(--text); resize: none; outline: none; max-height: 140px; line-height: 1.5; }
.uac-chat-textarea::placeholder { color: var(--muted); }
.uac-send-btn { width: 33px; height: 33px; border-radius: 8px; background: var(--accent); border: none; color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; transition: background .14s, opacity .14s; }
.uac-send-btn:disabled { opacity: .35; cursor: not-allowed; }
.uac-send-btn:hover:not(:disabled) { background: var(--accent-h); }
.uac-chat-note { font-size: 11px; color: var(--muted); text-align: center; margin-top: 7px; }

/* ── Auth Modal ──────────────────────────────────────────── */
.uac-modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.45); backdrop-filter: blur(4px); z-index: 9999; display: flex; align-items: center; justify-content: center; padding: 20px; animation: uac-fadein .18s ease; }
.uac-modal-card { background: var(--surface); border-radius: 18px; padding: 34px 30px 26px; width: 100%; max-width: 400px; position: relative; box-shadow: 0 24px 60px rgba(0,0,0,.17); animation: uac-slide-up .24s cubic-bezier(.16,1,.3,1); }
@keyframes uac-slide-up { from { opacity:0; transform: translateY(18px) scale(.97); } to { opacity:1; transform: none; } }
.uac-modal-close { position: absolute; top: 13px; right: 13px; width: 30px; height: 30px; border-radius: 7px; border: none; background: var(--bg); color: var(--muted); display: flex; align-items: center; justify-content: center; cursor: pointer; transition: background .12s; }
.uac-modal-close:hover { background: var(--border); }
.uac-modal-logo { display: flex; justify-content: center; margin-bottom: 14px; }
.uac-modal-title { font-family: 'Lora', serif; font-size: 23px; text-align: center; color: var(--text); margin-bottom: 7px; }
.uac-modal-sub { font-size: 13px; color: var(--muted); text-align: center; line-height: 1.6; margin-bottom: 22px; }
.uac-field { margin-bottom: 11px; }
.uac-input { width: 100%; padding: 11px 13px; border: 1px solid var(--border); border-radius: 9px; font-family: 'Plus Jakarta Sans', sans-serif; font-size: 14px; color: var(--text); background: var(--bg); outline: none; transition: border-color .14s; }
.uac-input:focus { border-color: var(--accent); }
.uac-input::placeholder { color: var(--muted); }
.uac-modal-btn { width: 100%; padding: 13px; background: var(--accent); color: #fff; border: none; border-radius: 10px; font-family: 'Plus Jakarta Sans', sans-serif; font-size: 14px; font-weight: 600; cursor: pointer; margin-top: 4px; transition: background .14s; }
.uac-modal-btn:hover { background: var(--accent-h); }
.uac-modal-btn:disabled { opacity: .5; cursor: not-allowed; }
.uac-form-error { margin-top: 8px; padding: 9px 12px; background: #fef2f2; border: 1px solid #fca5a5; border-radius: 8px; font-size: 13px; color: #dc2626; }
.uac-switch { font-size: 13px; color: var(--muted); text-align: center; margin-top: 13px; }
.uac-switch a { color: var(--accent); text-decoration: none; font-weight: 500; }
.uac-switch a:hover { text-decoration: underline; }
.uac-modal-terms { font-size: 11px; color: var(--muted); text-align: center; margin-top: 14px; line-height: 1.5; }
.uac-modal-terms a { color: var(--muted); }

/* Toast */
.uac-toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: #18181f; color: #fff; padding: 10px 20px; border-radius: 10px; font-size: 13px; font-family: 'Plus Jakarta Sans', sans-serif; z-index: 99999; white-space: nowrap; animation: uac-fadein .18s ease; }

/* ── User dropdown ───────────────────────────────────────── */
#uac-user-row { position: relative; }
.uac-user-row {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 10px; font-size: 13px; font-weight: 500;
  border-radius: 9px; cursor: pointer;
  transition: background .13s;
  position: relative;
}
.uac-user-row:hover { background: rgba(0,0,0,.06); }
.uac-user-dropdown {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 0; right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
  overflow: hidden;
  z-index: 999;
  animation: uac-fadein .15s ease;
}
.uac-signout-btn {
  display: flex; align-items: center; gap: 9px;
  padding: 11px 14px;
  font-size: 13px; font-weight: 500;
  color: #dc2626;
  text-decoration: none;
  transition: background .12s;
  width: 100%;
}
.uac-signout-btn:hover { background: #fef2f2; }

/* ====================== DESKTOP LOCK + MOBILE SCROLL ====================== */
@media (min-width: 768px) {
    html, body {
        height: 100vh !important;
        overflow: hidden !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    .elementor-page, .elementor-element, .elementor-widget-container, .elementor-shortcode,
    .e-con, .e-con-full, .e-con-inner {
        height: 100vh !important;
        overflow: hidden !important;
    }
    #uac-app {
        height: 100vh !important;
        max-height: 100vh !important;
        overflow: hidden !important;
        display: flex !important;
    }
    .uac-sidebar { height: 100vh !important; overflow: hidden !important; }
    .uac-main { height: 100vh !important; overflow: hidden !important; flex: 1 !important; }
    .uac-welcome { height: 100% !important; overflow: hidden !important; }
    .uac-chat-screen { height: 100% !important; overflow: hidden !important; }
    #uac-messages { overflow-y: auto !important; flex: 1 !important; }
}

/* ====================== MOBILE - Scrollable ====================== */
@media (max-width: 767px) {
    html { height: 100dvh !important; overflow-y: auto !important; }
    body, .elementor-page, .elementor-element, .elementor-widget-container,
    .elementor-shortcode, .e-con, .e-con-full, .e-con-inner {
        height: auto !important;
        min-height: unset !important;
        overflow: visible !important;
    }
    #uac-app {
        flex-direction: column !important;
        height: auto !important;
        min-height: 100dvh !important;
        overflow: visible !important;
    }
    .uac-sidebar {
        width: 100% !important;
        height: auto !important;
        min-height: unset !important;
        overflow: visible !important;
        border-right: none !important;
        border-bottom: 1px solid var(--border) !important;
    }
    .uac-main, .uac-welcome, .uac-welcome-inner, .uac-card, .uac-chat-screen {
        height: auto !important;
        min-height: unset !important;
        overflow: visible !important;
    }
    .uac-welcome-inner { padding-bottom: 32px !important; }
    .uac-drop-row, .uac-url-row { grid-template-columns: 1fr !important; }
    .uac-vs { text-align: center !important; padding: 8px 0 !important; }
    .uac-submit-btn { width: 100% !important; }
    .uac-submit-row { padding-bottom: 20px !important; }
}

/* ====================== CLEAN MOBILE HEADER - Logo Left + Sign In Right ====================== */
@media (max-width: 600px) {
    /* Do NOT hide the sidebar or its content */
    .uac-sidebar {
        width: 100%;
        height: auto;
        min-height: unset;
        overflow: visible;
        padding: 14px 16px;
        border-right: none;
        border-bottom: 1px solid var(--border);
        display: content !important;
    }

    /* Keep the header sticky but do not hide the main sidebar content */
    .uac-sidebar-top {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 14px 20px;
        background: #ffffff;
        border-bottom: 1px solid var(--border);
        position: sticky;
        top: 0;
        z-index: 100;
    }

    /* Keep “New chat” and history visible */
    .uac-new-btn,
    .uac-sidebar-mid,
    .uac-sidebar-label,
    .uac-history-list,
    .uac-history-empty,
    .uac-history-item {
        display: block; /* remove the !important block‑only rule */
    }

    /* Optional: visually clean “sign in / user” on the right in header */
    .uac-sidebar-bottom {
        position: static;              /* static, not absolute */
        display: flex;
        justify-content: flex-end;
        margin-top: auto;
        padding: 8px 0;
    }

    .uac-signin-btn,
    .uac-user-row {
        width: auto;
        min-width: 110px;
        padding: 10px 16px;
        border-radius: 9999px;
        font-size: 13px;
        white-space: nowrap;
    }

    .uac-user-row {
        background: #f8f9ff;
        padding: 6px 14px;
        border-radius: 9999px;
    }

    .uac-avatar {
        width: 28px;
        height: 28px;
        font-size: 13px;
    }

    /* Keep the main layout simple */
    .uac-main {
        flex: 1;
        height: auto;
        overflow: visible;
    }

    .uac-welcome,
    .uac-card,
    .uac-chat-screen {
        height: auto;
        overflow: visible;
    }
}

/* ====================== GLOBAL ====================== */
#wpadminbar { display: none !important; }
html { margin-top: 0 !important; }
/* ====================== MULTI-PDF & REVIEW ADDITIONS ====================== */

/* Add-document button row */
.uac-add-doc-row {
    display: flex;
    justify-content: center;
    margin: 10px 0 4px;
}

.uac-add-doc-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: 1.5px dashed #023844;
    color: #023844;
    font-size: 13px;
    font-weight: 500;
    padding: 7px 18px;
    border-radius: 8px;
    cursor: pointer;
    transition: background .15s, color .15s;
}
.uac-add-doc-btn:hover { background: #f0f0ff; }

/* Extra slot rows (doc 3, 4, 5) */
.uac-extra-slot-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 8px 0;
}

.uac-extra-vs-label {
    font-size: 11px;
    font-weight: 600;
    color: #a0a0c0;
    white-space: nowrap;
    min-width: 42px;
    text-align: right;
}

/* Smaller drop zone variant for extra slots */
.uac-drop-zone-small {
    flex: 1;
    min-height: 64px !important;
    padding: 10px 14px !important;
}

.uac-drop-zone-small .uac-drop-title { font-size: 13px !important; }
.uac-drop-zone-small .uac-drop-hint  { font-size: 11px !important; }

/* Remove-slot button */
.uac-remove-slot-btn {
    background: none;
    border: none;
    color: #a0a0c0;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 6px;
    transition: color .15s, background .15s;
    flex-shrink: 0;
}
.uac-remove-slot-btn:hover { color: #ef4444; background: #fff0f0; }

/* Review panel */
.uac-review-hint {
    font-size: 13px;
    color: #71718a;
    text-align: center;
    margin: 0 0 14px;
    line-height: 1.5;
}

.uac-review-drop-wrap {
    display: flex;
    justify-content: center;
}

.uac-drop-single {
    width: 100%;
    max-width: 420px;
    min-height: 130px !important;
}

/* History badge for REVIEW type */
.uac-history-item [style*="REVIEW"],
.uac-history-item div:last-child { font-size: 11px; }
/*hide bar on desktop*/
#uac-mobile-user-bar {
    display: none;
}

@media (max-width: 768px) {
    #uac-mobile-user-bar {
        display: block;
    }
}
/*send button*/
.uac-send-btn {
    background: #000000 !important;
    border-radius: 10px !important;
    width: 36px !important;
    height: 36px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.uac-send-btn:hover:not(:disabled) {
    background: #222222 !important;
}

.uac-send-btn svg {
    color: #fff;
    fill: #fff;
}
/* ====================== MOBILE RESPONSIVE FIXES ====================== */
@media (max-width: 767px) {

    /* Tabs — scrollable row, no clipping */
    .uac-tabs {
        padding: 6px 6px 0 !important;
        gap: 0 !important;
        overflow-x: auto !important;
        flex-wrap: nowrap !important;
    }
    .uac-tab {
        font-size: 12px !important;
        padding: 8px 12px !important;
        gap: 5px !important;
        flex-shrink: 0 !important;
    }
    .uac-tab svg { width: 12px !important; height: 12px !important; }

    /* Card padding tighter on mobile */
    .uac-panel { padding: 16px 14px !important; }
    .uac-category-row { padding: 14px 14px 0 !important; gap: 8px !important; }

    /* Drop zones stack vertically */
    .uac-drop-row {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }
    .uac-url-row {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }
    .uac-vs { padding: 4px 0 !important; font-size: 11px !important; }

    /* Drop zone — comfortable height on mobile */
    .uac-drop-zone { min-height: 100px !important; }
    .uac-drop-single { max-width: 100% !important; min-height: 110px !important; }

    /* Review panel centered drop — full width on mobile */
    .uac-review-drop-wrap { display: block !important; }

    /* Submit button full width */
    .uac-submit-btn { width: 100% !important; justify-content: center !important; }

    /* Chat topbar — smaller padding */
    .uac-chat-topbar { padding: 10px 14px !important; }
    #uac-chat-title { font-size: 13px !important; }

    /* Chat footer tighter */
    .uac-chat-footer { padding: 10px 14px 14px !important; }

    /* Messages — less side margin */
    .uac-msg { width: 95% !important; }
    .uac-msg-user { margin-right: 2% !important; }
    .uac-msg-assistant { margin-left: 2% !important; }
    .uac-msg-body { padding-left: 28px !important; font-size: 13px !important; }

    /* Headline */
    .uac-headline { font-size: clamp(22px, 6vw, 30px) !important; }
    .uac-subline { font-size: 13px !important; margin-bottom: 18px !important; }

    /* Welcome padding */
    .uac-welcome { padding: 20px 14px !important; }

    /* Category select full width */
    .uac-cat-select { min-width: unset !important; width: 100% !important; }

    /* Extra slot rows */
    .uac-extra-slot-row { gap: 6px !important; }
    .uac-extra-vs-label { min-width: 30px !important; font-size: 10px !important; }

    /* New comparison button top bar */
    .uac-new-top-btn { font-size: 11px !important; padding: 6px 9px !important; }
    .uac-score-pill { font-size: 11px !important; }
}
