/* ==========================================================================
   custom.css — AIBOT99 in-house tweaks on top of the aibot99_style theme.
   Loaded AFTER ui-core.css / dashboard.css / style.css, so it overrides them.
   Put new UI tweaks HERE instead of editing the big theme files.
   ========================================================================== */

/* ---- Sidebar "Account Balance" card: heading stays on one line ---- */
.wallet-box h4 {
    font-size: 11.5px;
    letter-spacing: .02em;
    white-space: nowrap;
    padding-inline-end: 46px;
}

/* ---- Text selection: readable on brand-gradient cards ---- */
::selection { background: color-mix(in srgb, var(--primary) 40%, transparent); color: var(--text); }
::-moz-selection { background: color-mix(in srgb, var(--primary) 40%, transparent); color: var(--text); }
.wallet-box ::selection { background: #fff; color: var(--primary); }
.wallet-box ::-moz-selection { background: #fff; color: var(--primary); }

/* ---- USD currency indicator: always coloured, not only on hover ---- */
.btn-custom.show-currency {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
    color: var(--primary-ink) !important;
}

/* ---- Hero: longer languages keep the headline to two lines ---- */
.home-section .text-box h3:lang(es),
.home-section .text-box h3:lang(pt),
.home-section .text-box h3:lang(vi) { font-size: clamp(24px, 2.9vw, 40px); }

/* ---- Hero card: USDT coin icons (no green chip background) ---- */
.hv-row .hv-coin .hv-ic.hv-ic-coin { background: transparent; }
.hv-row .hv-coin .hv-ic.hv-ic-coin img { display: block; width: 30px; height: 30px; }

/* ---- Add Fund: empty currency-select slot shouldn't reserve a gap ---- */
.add-select-field:empty { margin-bottom: 0 !important; }

/* ---- Small icon action button in tables (ticket list, etc.) ---- */
a.btn-action-icon, button.btn-action-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; border: 0; border-radius: 8px;
    background: var(--primary); color: #fff !important;
    font-size: 14px; line-height: 1; transition: filter .2s;
}
a.btn-action-icon:hover { filter: brightness(.92); color: #fff !important; }
.btn-action-icon.bg-success { background: var(--success) !important; }
.btn-action-icon i { color: #fff !important; }

/* ---- Dashboard heading row with an action button on the right ---- */
.dashboard-heading {
    display: flex; align-items: center; justify-content: space-between;
    gap: 16px; flex-wrap: wrap; margin-bottom: 18px;
}
.dashboard-heading h4 { font-size: 20px; font-weight: 700; margin: 0; }
.dashboard-heading .btn-custom { font-size: 14px; font-weight: 600; white-space: nowrap; }

/* ==========================================================================
   Support ticket — reply form + conversation (matches the actual view DOM)
   ========================================================================== */
.support-area .typing-area {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 22px;
}
.golden-text {
    font-size: 15px; font-weight: 600; color: var(--text);
    margin-bottom: 12px; display: flex; align-items: center; gap: 8px;
}
.golden-text i { color: var(--primary); }
.support-area .ticket-box {
    width: 100%; padding: 12px 14px; min-height: 120px; resize: vertical;
    background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px;
    color: var(--text); font-size: 14px; transition: border-color .2s, box-shadow .2s;
}
.support-area .ticket-box:focus {
    outline: 0; border-color: var(--primary);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent);
}
.input-group2 > div {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; margin-top: 12px; flex-wrap: wrap;
}
.typing-area .upload-img { display: inline-flex; align-items: center; gap: 8px; border: 0; background: transparent; padding: 0; }
.send-file-btn {
    position: relative; display: inline-flex; align-items: center; gap: 6px;
    background: var(--surface-2); color: var(--text-soft); border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm); padding: 9px 14px; font-weight: 600; cursor: pointer;
}
.send-file-btn input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

/* conversation — each message is a .chat-box; reset the theme's old card look */
.chats { display: flex; flex-direction: column; gap: 18px; margin-top: 22px; max-height: 560px; overflow-y: auto; padding-inline-end: 4px; }
.chats .chat-box {
    display: flex; align-items: flex-end; gap: 10px; max-width: 82%;
    background: transparent; border: 0; box-shadow: none; overflow: visible;
}
.chats .chat-box.this-side { margin-inline-start: auto; }
.chats .chat-box.opposite-side { margin-inline-end: auto; }
.chats .chat-box .img img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; flex: none; }
.chats .chat-box .text-wrapper { display: flex; flex-direction: column; min-width: 0; }
.chats .chat-box.this-side .text-wrapper { align-items: flex-end; }
.chats .chat-box .sendBy { font-size: 12px; color: var(--muted); font-weight: 600; margin-bottom: 4px; }
.chats .chat-box .text {
    background: var(--surface-2); border: 1px solid var(--border);
    border-radius: 14px 14px 14px 4px; padding: 10px 14px;
    color: var(--text-soft); font-size: 14px; word-break: break-word;
}
.chats .chat-box.this-side .text {
    background: var(--primary-soft);
    border-color: color-mix(in srgb, var(--primary) 25%, transparent);
    border-radius: 14px 14px 4px 14px;
}
.chats .chat-box .text p { margin: 0; }
.chats .chat-box .time { font-size: 11px; color: var(--muted); margin-top: 5px; }
.chats .chat-box .fileShow { margin-top: 6px; }
.chats .chat-box .fileShow a { font-size: 12.5px; color: var(--primary); }

/* ==========================================================================
   Hero floating pills — keep inside the card on tablet/mobile.
   Stock only pulled in hv-p1/hv-p2; hv-p3 ("Paid out") still had -7% and
   hung off the left edge on small screens.
   ========================================================================== */
@media (max-width: 1199.98px) {
    .hv-pill.hv-p3 { inset-inline-start: 0; }
}
@media (max-width: 767.98px) {
    .hv-pill.hv-p1 { inset-inline-start: 3%; top: 0; }
    .hv-pill.hv-p2 { inset-inline-end: 3%; }
    .hv-pill.hv-p3 { inset-inline-start: 3%; bottom: 0; }
}
@media (max-width: 575.98px) {
    .hv-pill { font-size: 12px; padding: 7px 12px; }
}

/* ==========================================================================
   Dashboard "Copy Link" button (referral card): a stray Bootstrap .text-dark
   overrode the on-primary ink colour, making the label invisible on the
   purple button. Force white (var(--primary-ink)) on that button.
   ========================================================================== */
#copyBtn,
.refferal-box .input-group .btn.text-dark {
    color: var(--primary-ink) !important;
}
