﻿/* IT Support quick-action button (left of the notification bell) + quick modal.
   Button styling mirrors #notif-bell (Content/notif.css) so they sit as a pair. */

#tkt-btn-wrap { position: relative; height: 100%; display: inline-block; }
#tkt-btn {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 5px 10px;
    height: 100%;
    font-size: 14px;
    cursor: pointer;
    line-height: 1;
}
#tkt-btn:hover { background: #e2e8f0; }

#tkt-menu {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    width: 230px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .15);
    z-index: 9998;
    overflow: hidden;
    text-align: left;
}
.tkt-menu-item {
    padding: 11px 14px;
    font-size: 13px;
    color: #0f172a;
    cursor: pointer;
    white-space: nowrap;
}
.tkt-menu-item:hover { background: #f1f5f9; }
.tkt-menu-item + .tkt-menu-item { border-top: 1px solid #f1f5f9; }

/* ── quick modal ─────────────────────────────────────────────────────── */
.tkt-quick-wrap { position: fixed; inset: 0; z-index: 10001; display: flex; align-items: flex-start; justify-content: center; padding: 60px 16px; }
.tkt-quick-backdrop { position: fixed; inset: 0; background: rgba(15,23,42,.45); }
.tkt-quick-card {
    position: relative; z-index: 1; background: #fff; border-radius: 14px;
    width: 100%; max-width: 440px; padding: 20px; box-shadow: 0 20px 50px rgba(0,0,0,.3);
}
.tkt-q-label { display: block; font-size: 12px; font-weight: 600; color: #374151; margin-bottom: 4px; }
.tkt-q-input {
    width: 100%; padding: 8px 11px; border: 1px solid #d1d5db; border-radius: 8px;
    font-size: 13px; color: #111; background: #fff; box-sizing: border-box;
}
.tkt-q-input:focus { outline: none; border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,.15); }
.tkt-q-btn { padding: 8px 16px; border-radius: 8px; border: none; font-size: 13px; font-weight: 600; cursor: pointer; }
.tkt-q-cancel { background: #e2e8f0; color: #334155; }
.tkt-q-save { background: #2563eb; color: #fff; }
.tkt-q-save:disabled { background: #93c5fd; cursor: not-allowed; }

/* ── toast ───────────────────────────────────────────────────────────── */
#tkt-toast {
    position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px);
    background: #0f172a; color: #fff; padding: 10px 18px; border-radius: 10px;
    font-size: 13px; z-index: 10002; opacity: 0; pointer-events: none; transition: all .25s;
}
#tkt-toast.tkt-toast-show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── attachment drop zone + chips (shared by quick widget + Tickets page) ─ */
.tkt-attach-drop {
    border: 1.5px dashed #cbd5e1; border-radius: 10px; padding: 14px; text-align: center;
    font-size: 13px; color: #64748b; cursor: pointer; background: #f8fafc;
}
.tkt-attach-drop:hover { border-color: #2563eb; color: #2563eb; }
.tkt-attach-drop.dragover { border-color: #2563eb; background: #eff6ff; color: #1d4ed8; border-style: solid; }
.tkt-attach-item {
    display: flex; align-items: center; gap: 6px; border: 1px solid #e2e8f0;
    border-radius: 8px; padding: 5px 8px; background: #fff;
}
.tkt-attach-del {
    border: none; background: #fee2e2; color: #b91c1c; border-radius: 6px;
    width: 22px; height: 22px; cursor: pointer; font-size: 14px; line-height: 1;
}
.tkt-attach-del:hover { background: #fecaca; }
body.dark-theme .tkt-attach-drop { background: #16223a; border-color: #334155; color: #94a3b8; }
body.dark-theme .tkt-attach-item { background: #1e293b; border-color: #334155; }

/* ── @-mention dropdown (shared by quick widget + Tickets page) ───────── */
.tkt-mention-dd {
    position: absolute;
    z-index: 10050;
    max-height: 220px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .15);
    font-size: 13px;
}
.tkt-mention-item { padding: 7px 12px; cursor: pointer; display: flex; flex-direction: column; gap: 1px; }
.tkt-mention-item.active, .tkt-mention-item:hover { background: #eff6ff; }
.tkt-mention-name { font-weight: 600; color: #0f172a; }
.tkt-mention-email { font-size: 11px; color: #94a3b8; }
body.dark-theme .tkt-mention-dd { background: #1e293b; border-color: #334155; }
body.dark-theme .tkt-mention-item.active, body.dark-theme .tkt-mention-item:hover { background: #001335; }
body.dark-theme .tkt-mention-name { color: #e2e8f0; }

/* ── custom dropdown (TktDropdown — `tdd-` classes) ──────────────────── */
.tdd-wrap { position: relative; display: inline-block; width: 100%; }
.tdd-wrap > select { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; padding: 0; margin: 0; border: 0; }
.tdd-trigger {
    width: 100%; padding: 7px 11px 7px 11px;
    border: 1px solid #d1d5db; border-radius: 8px;
    font-size: 13px; color: #111; background: #fff;
    text-align: left; cursor: pointer;
    display: flex; align-items: center; justify-content: space-between;
    line-height: 1.4; min-height: 34px; white-space: nowrap; overflow: hidden;
}
.tdd-trigger:focus, .tdd-wrap.open .tdd-trigger { outline: none; border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,.15); }
.tdd-wrap.disabled .tdd-trigger { background: #f3f4f6; color: #94a3b8; cursor: not-allowed; }
.tdd-trigger .tdd-arrow { color: #6b7280; flex-shrink: 0; margin-left: 6px; font-size: 10px; transition: transform .15s; }
.tdd-wrap.open .tdd-trigger .tdd-arrow { transform: rotate(180deg); }
.tdd-trigger .tdd-label { overflow: hidden; text-overflow: ellipsis; }
.tdd-trigger .tdd-placeholder { color: #94a3b8; }
.tdd-panel {
    position: fixed; z-index: 99999;
    background: #fff; border: 1px solid #e2e8f0; border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,.12);
    max-height: 280px; overflow-y: auto; padding: 4px; min-width: 160px;
}
.tdd-option {
    padding: 7px 12px; border-radius: 6px; font-size: 13px; color: #0f172a; cursor: pointer;
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.tdd-option:hover { background: #f1f5f9; }
.tdd-option.active { background: #eff6ff; color: #1d4ed8; font-weight: 600; }
.tdd-option.active::after { content: "✓"; color: #2563eb; }
.tdd-option.disabled { color: #cbd5e1; pointer-events: none; }
.tdd-search-wrap { position: sticky; top: 0; background: #fff; padding: 4px; border-bottom: 1px solid #f1f5f9; z-index: 1; }
.tdd-search { width: 100%; padding: 5px 9px; border: 1px solid #d1d5db; border-radius: 6px; font-size: 12px; outline: none; }
.tdd-search:focus { border-color: #2563eb; box-shadow: 0 0 0 2px rgba(37,99,235,.15); }
body.dark-theme .tdd-trigger { background: #1e293b; color: #e2e8f0; border-color: #334155; }
body.dark-theme .tdd-wrap.disabled .tdd-trigger { background: #16223a; color: #64748b; }
body.dark-theme .tdd-trigger .tdd-arrow { color: #94a3b8; }
body.dark-theme .tdd-panel { background: #1e293b; border-color: #334155; box-shadow: 0 10px 30px rgba(0,0,0,.45); }
body.dark-theme .tdd-option { color: #e2e8f0; }
body.dark-theme .tdd-option:hover { background: #233149; }
body.dark-theme .tdd-option.active { background: #1e3a8a; color: #bfdbfe; }
body.dark-theme .tdd-search-wrap { background: #1e293b; border-bottom-color: #334155; }
body.dark-theme .tdd-search { background: #0f172a; color: #e2e8f0; border-color: #334155; }

/* dark theme */
body.dark-theme #tkt-btn { background: #1e293b; color: #e2e8f0; border-color: #334155; }
body.dark-theme #tkt-menu { background: #1e293b; color: #e2e8f0; border-color: #334155; }
body.dark-theme .tkt-menu-item { color: #e2e8f0; }
body.dark-theme .tkt-menu-item:hover { background: #001335; }
body.dark-theme .tkt-quick-card { background: #1e293b; color: #e2e8f0; }
body.dark-theme .tkt-q-label { color: #cbd5e1; }
