/* BOKI — Support (business requests and super admin). Uses the Boki tokens of boki.css (--boki, --boki-dark, --boki-soft). */

/* Lists */
.bks-list { display: flex; flex-direction: column; }
.bks-row { display: flex; align-items: center; gap: 14px; padding: 14px 20px; border-bottom: 1px solid #f0f2f7; color: inherit; transition: background .15s; }
.bks-row:last-child { border-bottom: 0; }
.bks-row:hover { background: #f8f9fc; color: inherit; }
.bks-row.is-unread { background: #f3fbf9; }
.bks-row.is-unread strong { font-weight: 700; }
.bks-row.is-unread .bks-cat-ic { box-shadow: 0 0 0 2px var(--boki, #12a08d); }
.bks-cat-ic { display: inline-grid; place-items: center; flex: 0 0 42px; width: 42px; height: 42px; border-radius: 12px; background: var(--boki-soft, #e3f5f1); color: var(--boki-dark, #0b7d6e); font-size: 19px; }
.bks-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.bks-row-main strong { color: #1f2b3a; font-weight: 600; }
.bks-row-top { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.bks-row-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; }
.bks-row-go { color: #c5ccda; }
.has-rtl .bks-row-go, [dir=rtl] .bks-row-go { transform: scaleX(-1); }
@media (max-width: 575px) { .bks-row { padding: 12px 14px; gap: 10px; } .bks-row-go { display: none; } }

/* Labels */
.bks-num { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; color: #6b7a90; font-weight: 600; }
.bks-num.is-lg { font-size: 13px; padding: 2px 8px; border-radius: 6px; background: #f0f2f7; }
.bks-cat { font-size: 11.5px; font-weight: 600; color: #526484; background: #f0f2f7; border-radius: 6px; padding: 1px 7px; }
.bks-company { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; color: var(--boki-dark, #0b7d6e); }
a.bks-company:hover { text-decoration: underline; }
.bks-status { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.bks-status i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.bks-status.is-open { background: #fff4e5; color: #b45f00; }
.bks-status.is-answered { background: var(--boki-soft, #e3f5f1); color: var(--boki-dark, #0b7d6e); }
.bks-status.is-closed { background: #f0f2f7; color: #6b7a90; }
.bks-tab-count { display: inline-block; min-width: 20px; margin-inline-start: 4px; padding: 0 6px; border-radius: 999px; background: #f0f2f7; font-size: 11.5px; font-weight: 700; text-align: center; }
.boki-pills .nav-link.active .bks-tab-count { background: #fff; }
.bks-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }

/* New request */
.bks-form-card { max-width: 820px; }
.bks-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; }
.bks-cat-card { position: relative; margin: 0; cursor: pointer; }
.bks-cat-card input { position: absolute; opacity: 0; }
.bks-cat-card span { display: flex; align-items: center; gap: 10px; padding: 12px; border: 1.5px solid #e5e9f2; border-radius: 12px; background: #fff; transition: border-color .15s, background .15s; }
.bks-cat-card .icon { font-size: 19px; color: #526484; }
.bks-cat-card strong { font-size: 13.5px; font-weight: 600; color: #364a63; line-height: 1.25; }
.bks-cat-card:hover span { border-color: #c5ccda; }
.bks-cat-card input:checked + span { border-color: var(--boki, #12a08d); background: var(--boki-soft, #e3f5f1); }
.bks-cat-card input:checked + span .icon { color: var(--boki-dark, #0b7d6e); }
.bks-cat-card input:focus-visible + span { outline: 2px solid var(--boki, #12a08d); outline-offset: 2px; }
.bks-drop { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 0; padding: 16px; border: 1.5px dashed #c5ccda; border-radius: 12px; cursor: pointer; color: #526484; width: 100%; }
.bks-drop:hover { border-color: var(--boki, #12a08d); }
.bks-drop > .icon { font-size: 22px; color: var(--boki-dark, #0b7d6e); }
.bks-drop strong { display: block; color: #364a63; }
.bks-drop small { color: #8094ae; }
.bks-drop .invalid, .bks-attach .invalid { flex-basis: 100%; }

/* Conversation */
.bks-thread { display: flex; flex-direction: column; gap: 18px; }
.bks-msg { display: flex; gap: 12px; max-width: 88%; }
.bks-msg.is-mine { flex-direction: row-reverse; margin-inline-start: auto; }
.bks-avatar { display: inline-grid; place-items: center; flex: 0 0 36px; width: 36px; height: 36px; border-radius: 50%; background: #e8ebf3; color: #364a63; font-weight: 700; font-size: 14px; overflow: hidden; }
.bks-msg.is-team .bks-avatar { background: var(--boki-soft, #e3f5f1); }
.bks-msg.is-team .bks-avatar img { width: 100%; height: 100%; object-fit: cover; }
.bks-msg-body { min-width: 0; }
.bks-msg-body header { display: flex; gap: 8px; align-items: baseline; margin-bottom: 4px; font-size: 12.5px; }
.bks-msg.is-mine .bks-msg-body header { justify-content: flex-end; }
.bks-msg-body header strong { color: #1f2b3a; }
.bks-msg-body header time { color: #8094ae; }
.bks-text { padding: 12px 16px; border-radius: 4px 16px 16px 16px; background: #f5f6fa; color: #364a63; line-height: 1.6; overflow-wrap: anywhere; }
.bks-msg.is-mine .bks-text { border-radius: 16px 4px 16px 16px; background: var(--boki-dark, #0b7d6e); color: #fff; }
.bks-msg.is-team:not(.is-mine) .bks-text { background: var(--boki-soft, #e3f5f1); color: #1f2b3a; }
.bks-files { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; }
.bks-msg.is-mine .bks-files { justify-content: flex-end; }
.bks-file { display: flex; align-items: center; gap: 10px; padding: 6px 12px 6px 6px; border: 1px solid #e5e9f2; border-radius: 10px; background: #fff; max-width: 260px; color: #364a63; }
.bks-file:hover { border-color: var(--boki, #12a08d); color: #364a63; }
.bks-file img { width: 44px; height: 44px; border-radius: 7px; object-fit: cover; }
.bks-file-ext { display: inline-grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 7px; background: #fde8ea; color: #c81e3c; font-size: 11px; font-weight: 700; }
.bks-file-name { min-width: 0; font-size: 12.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bks-file-name small { display: block; font-weight: 400; color: #8094ae; }
.bks-event { display: flex; justify-content: center; align-items: center; gap: 10px; font-size: 12.5px; color: #6b7a90; position: relative; }
.bks-event::before { content: ""; position: absolute; inset-inline: 0; top: 50%; border-top: 1px dashed #e5e9f2; }
.bks-event span, .bks-event time { position: relative; background: #fff; padding: 0 8px; }
.bks-event span { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
@media (max-width: 575px) { .bks-msg { max-width: 100%; } .bks-event time { display: none; } }

/* Reply box */
.bks-composer-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 10px; }
.bks-attach { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; cursor: pointer; max-width: 100%; }
.bks-attach [data-file-label] { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bks-closed { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px; background: #f5f6fa; color: #526484; }

/* Dark mode */
.dark-mode .bks-row { border-bottom-color: #2b3748; }
.dark-mode .bks-row:hover { background: #1c2636; }
.dark-mode .bks-row.is-unread { background: rgba(18, 160, 141, .1); }
.dark-mode .bks-row-main strong, .dark-mode .bks-msg-body header strong, .dark-mode .bks-drop strong, .dark-mode .bks-cat-card strong { color: #e6ebf2; }
.dark-mode .bks-cat-ic, .dark-mode .bks-status.is-answered, .dark-mode .bks-msg.is-team .bks-avatar { background: rgba(18, 160, 141, .16); color: #4fd1bd; }
.dark-mode .bks-num.is-lg, .dark-mode .bks-cat, .dark-mode .bks-tab-count, .dark-mode .bks-status.is-closed, .dark-mode .bks-closed { background: #1c2636; color: #aab7ca; }
.dark-mode .bks-status.is-open { background: rgba(255, 157, 25, .14); color: #ffb44d; }
.dark-mode .bks-company { color: #4fd1bd; }
.dark-mode .bks-cat-card span, .dark-mode .bks-file { background: #18212d; border-color: #2b3748; color: #aab7ca; }
.dark-mode .bks-cat-card input:checked + span { background: rgba(18, 160, 141, .12); border-color: #12a08d; }
.dark-mode .bks-drop { border-color: #2b3748; color: #aab7ca; }
.dark-mode .bks-avatar { background: #2b3748; color: #e6ebf2; }
.dark-mode .bks-text { background: #1c2636; color: #dbe2ea; }
.dark-mode .bks-msg.is-team:not(.is-mine) .bks-text { background: rgba(18, 160, 141, .14); color: #e6ebf2; }
.dark-mode .bks-event::before { border-top-color: #2b3748; }
.dark-mode .bks-event span, .dark-mode .bks-event time { background: #141c26; }
