/**
 * components.css — styles for Blade components (extracted from inline <style>)
 * Toast, tables, pagination, header, exchange components
 */

/* ========== Toast ========== */
.toast-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}
.toast {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    min-width: 320px;
    max-width: 400px;
    padding: 16px;
    background: var(--glass-bg, rgba(10, 14, 39, 0.50));
    backdrop-filter: var(--glass-blur, blur(20px));
    -webkit-backdrop-filter: var(--glass-blur, blur(20px));
    border: 1px solid var(--border-subtle, rgba(229, 229, 229, 0.1));
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    cursor: pointer;
    pointer-events: auto;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.toast:hover {
    transform: translateX(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}
.toast.success { border-left: 4px solid #2ECC71; }
.toast.error { border-left: 4px solid #FF4D4F; }
.toast.info { border-left: 4px solid #3BC5FF; }
.toast.warning { border-left: 4px solid #FFC014; }
.toast-icon { flex-shrink: 0; width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; }
.toast.success .toast-icon { color: #2ECC71; }
.toast.error .toast-icon { color: #FF4D4F; }
.toast.info .toast-icon { color: #3BC5FF; }
.toast.warning .toast-icon { color: #FFC014; }
.toast-content { flex: 1; min-width: 0; }
.toast-title { font-size: 14px; font-weight: 600; color: var(--text-primary, #E5E5E5); margin-bottom: 4px; }
.toast-message { font-size: 13px; color: var(--text-secondary, #999DB5); line-height: 1.4; }
.toast-close {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background: transparent;
    border: none;
    color: var(--text-tertiary, #999DB5);
    cursor: pointer;
    transition: all 0.2s;
}
.toast-close:hover {
    background: var(--bg-tertiary, rgba(229, 229, 229, 0.05));
    color: var(--text-primary, #E5E5E5);
}
@media (max-width: 768px) {
    .toast-container { top: 70px; right: 12px; left: 12px; }
    .toast { min-width: auto; max-width: 100%; }
}

/* ========== Table (ui/table) mobile ========== */
@media (max-width: 768px) {
    .mobile-hide { display: none !important; }
    .fintech-table-mobile-card thead { display: none; }
    .fintech-table-mobile-card tbody tr {
        display: block;
        margin-bottom: var(--space-4, 16px);
        border: 1px solid var(--border-subtle);
        border-radius: 12px;
        /*background: var(--bg-secondary);*/
        padding: var(--space-4, 16px);
    }
    .fintech-table-mobile-card tbody td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: var(--space-2, 8px) 0;
        border: none;
        text-align: right !important;
    }
    .fintech-table-mobile-card tbody td::before {
        content: attr(data-label);
        font-weight: 600;
        text-transform: uppercase;
        font-size: var(--font-size-xs, 11px);
        color: var(--text-secondary);
    }
}

/* ========== Pagination (fintech) ========== */
.tx-pagination { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 8px; }
.tx-pagination__inner { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center; }
.tx-pagination__btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 10px 16px; min-height: 44px;
    background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.12);
    border-radius: 8px; color: #E5E5E5; font-size: 13px; font-weight: 600;
    text-decoration: none; transition: all 0.2s; white-space: nowrap;
}
.tx-pagination__btn:hover { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.2); color: #fff; }
.tx-pagination__btn--disabled { opacity: 0.5; cursor: not-allowed; pointer-events: none; }
.tx-pagination__pages { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.tx-pagination__page {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 40px; min-height: 40px; padding: 8px 12px;
    background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.12);
    border-radius: 8px; color: #E5E5E5; font-size: 13px; font-weight: 600;
    text-decoration: none; transition: all 0.2s;
}
.tx-pagination__page:hover { background: rgba(255,255,255,0.12); color: #fff; }
.tx-pagination__page--active { background: rgba(255,193,20,0.2); border-color: #FFC114; color: #FFC114; }
.tx-pagination__dots { padding: 0 8px; color: #999DB5; font-size: 13px; }

/* ========== Support chat ========== */
@keyframes pulse-dot {
    0%, 100% { box-shadow: 0 0 0 0 rgba(46,204,113,.6); }
    50% { box-shadow: 0 0 0 5px rgba(46,204,113,0); }
}

/* ========== Header theme switcher ========== */
.header-theme-switcher { position: relative; }
.header-theme-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--bg-tertiary, rgba(229, 229, 229, 0.05));
    border: 1px solid var(--border-subtle, rgba(229, 229, 229, 0.1));
    color: var(--text-secondary, #999DB5);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.header-theme-button:hover {
    background: var(--bg-secondary, rgba(229, 229, 229, 0.08));
    border-color: var(--border-medium, rgba(229, 229, 229, 0.2));
    color: var(--text-primary, #E5E5E5);
}

/* ========== Wallet table (exchange) mobile ========== */
@media (max-width: 768px) {
    .wallet-table-wrapper {
        padding: 0 !important;
        overflow: visible !important;
        background: transparent !important;
        box-shadow: none !important;
    }
    .wallet-table-wrapper table { display: block !important; width: 100% !important; max-width: 100% !important; min-width: 0 !important; }
    .wallet-table-wrapper thead { display: none !important; }
    .wallet-table-wrapper tbody { display: block !important; width: 100% !important; }
    .wallet-table-wrapper tbody tr {
        display: block !important; width: 100% !important; max-width: 100% !important;
        margin: 0 0 14px 0 !important; padding: 18px !important;
        /*background: rgba(8, 8, 11, 0.85) !important;*/
        backdrop-filter: blur(16px) !important;
        -webkit-backdrop-filter: blur(16px) !important;
        border: 1px solid rgba(45, 45, 50, 0.4) !important;
        border-radius: 14px !important;
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.7), 0 2px 8px rgba(0, 0, 0, 0.5) !important;
    }
    .wallet-table-wrapper tbody td {
        display: flex !important; justify-content: space-between !important; align-items: center !important;
        padding: 14px 0 !important; border-bottom: 1px solid rgba(45, 45, 50, 0.3) !important;
        text-align: left !important; width: 100% !important; max-width: 100% !important;
    }
    .wallet-table-wrapper tbody td[data-label]::before {
        content: attr(data-label) !important; font-size: 10px !important; font-weight: 700 !important;
        text-transform: uppercase !important; letter-spacing: 0.5px !important; color: #999DB5 !important;
        margin-right: 16px !important; min-width: 100px !important; flex-shrink: 0 !important;
    }
    .wallet-table-wrapper tbody td[data-label="Asset"] {
        flex-direction: row !important; padding-bottom: 18px !important; margin-bottom: 10px !important;
        border-bottom: 2px solid rgba(45, 45, 50, 0.5) !important;
    }
    .wallet-table-wrapper tbody td[data-label="Asset"]::before { display: none !important; }
    .wallet-table-wrapper tbody td[data-label="Actions"] {
        flex-direction: column !important; padding-top: 16px !important;
        border-top: 1px solid rgba(45, 45, 50, 0.3) !important;
    }
    .wallet-table-wrapper tbody td[data-label="Actions"]::before {
        margin-bottom: 8px !important; width: 100% !important; padding-bottom: 8px !important;
        border-bottom: 1px solid rgba(45, 45, 50, 0.3) !important;
    }
    .wallet-table-wrapper .wallet-actions-buttons { flex-direction: column !important; gap: 8px !important; width: 100% !important; }
    .wallet-table-wrapper .wallet-action-btn { width: 100% !important; min-height: 44px !important; padding: 12px 16px !important; }
    .wallet-table-wrapper tbody td.mobile-hide,
    .wallet-table-wrapper tbody td[data-label="Locked"] { display: none !important; }
}

/* ========== Data table dense (exchange) mobile ========== */
@media (max-width: 768px) {
    .data-table-dense { overflow-x: visible !important; }
    .data-table-dense table { display: block; width: 100%; min-width: 0 !important; }
    .data-table-dense thead { display: none; }
    .data-table-dense tbody { display: block; width: 100%; }
    .data-table-dense tbody tr {
        display: block;
        background: rgba(8, 8, 11, 0.85);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        border: 1px solid rgba(45, 45, 50, 0.4);
        border-radius: 14px;
        padding: 18px;
        margin-bottom: 14px;
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.7), 0 2px 8px rgba(0, 0, 0, 0.5), inset 0 1px 2px rgba(0, 0, 0, 0.3);
        position: relative;
        overflow: hidden;
    }
    .data-table-dense tbody tr:last-child { margin-bottom: 0; }
    .data-table-dense tbody td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 14px 0;
        border-bottom: 1px solid rgba(45, 45, 50, 0.3);
        text-align: left !important;
        width: 100%;
        min-height: 44px;
    }
    .data-table-dense tbody td:last-child { border-bottom: none; padding-bottom: 0; }
    .data-table-dense tbody td::before {
        /*content: attr(data-label);*/
        font-size: 10px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        color: var(--text-secondary);
        margin-right: 16px;
        min-width: 100px;
        flex-shrink: 0;
        opacity: 0.8;
    }
}

/* ========== Trading form glass (exchange) ========== */
.otabs { display: flex; gap: 0; border-bottom: 1px solid rgba(255,255,255,0.07); margin-bottom: 12px; }
.otab { flex: 1; padding: 8px 4px; font-size: 11px; font-weight: 600; color: #999DB5; background: none; border: none; cursor: pointer; border-bottom: 2px solid transparent; transition: all 0.2s; text-align: center; letter-spacing: 0.3px; text-transform: uppercase; }
.otab.active.buy { color: #2ECC71; border-color: #2ECC71; }
.otab.active.sell { color: #FF4D4F; border-color: #FF4D4F; }
.otab:hover:not(.active) { color: #E5E5E5; }
.stabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 14px; }
.stab { padding: 10px; font-size: 12px; font-weight: 700; border: none; border-radius: 8px; cursor: pointer; background: rgba(255,255,255,0.05); color: #999DB5; transition: all 0.2s; }
.stab.buy.active { background: rgba(46,204,113,0.18); color: #2ECC71; }
.stab.sell.active { background: rgba(255,77,79,0.18); color: #FF4D4F; }
.stab:hover:not(.active) { background: rgba(255,255,255,0.08); color: #E5E5E5; }
.tf-row { margin-bottom: 10px; }
.tf-label { display: flex; justify-content: space-between; align-items: center; font-size: 10px; color: #999DB5; font-weight: 600; text-transform: uppercase; letter-spacing: 0.4px; margin-bottom: 5px; }
.tf-label span:last-child { color: #E5E5E5; font-size: 11px; text-transform: none; letter-spacing: 0; }
.tf-input-wrap { position: relative; }
.tf-input { width: 100%; padding: 10px 60px 10px 12px; background: rgba(8,8,11,.8); border: 1px solid rgba(255,255,255,.08); border-radius: 8px; color: #E5E5E5; font-size: 13px; font-family: 'Roboto Mono', monospace; outline: none; box-sizing: border-box; transition: border-color 0.2s; }
.tf-input:focus { border-color: rgba(255,255,255,.2); }
.tf-unit { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font-size: 11px; font-weight: 700; color: #999DB5; pointer-events: none; }
.tf-hint { font-size: 10px; color: #666; margin-top: 3px; }
.tf-pcts { display: flex; gap: 4px; margin-top: 6px; }
.tf-pct { flex: 1; padding: 5px 0; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.07); border-radius: 5px; color: #999DB5; font-size: 10px; font-weight: 600; cursor: pointer; transition: all 0.15s; text-align: center; }
.tf-pct:hover { background: rgba(255,255,255,.10); color: #E5E5E5; border-color: rgba(255,255,255,.15); }
.sl-badge { padding: 2px 7px; background: rgba(255,193,20,.12); border: 1px solid rgba(255,193,20,.25); border-radius: 4px; color: #ffc014; font-size: 9px; font-weight: 700; letter-spacing: 0.3px; }
.tf-sum { display: flex; justify-content: space-between; align-items: center; font-size: 11px; padding: 4px 0; border-bottom: 1px solid rgba(255,255,255,.04); }
.tf-sum:last-child { border: none; }
.tf-sum-label { color: #999DB5; }
.tf-sum-val { color: #E5E5E5; font-family: 'Roboto Mono', monospace; }
.tf-sum-val.green { color: #2ECC71; }
.tf-sum-val.red { color: #FF4D4F; }
.tf-submit { width: 100%; padding: 12px; border: none; border-radius: 9px; font-size: 13px; font-weight: 700; cursor: pointer; margin-top: 12px; transition: all 0.2s; text-transform: uppercase; letter-spacing: 0.5px; }
.tf-submit.buy { background: #2ECC71; color: #000; }
.tf-submit.sell { background: #FF4D4F; color: #fff; }
.tf-submit:disabled { opacity: 0.35; cursor: not-allowed; }
.tf-submit.buy:not(:disabled):hover { background: #34D97A; transform: translateY(-1px); }
.tf-submit.sell:not(:disabled):hover { background: #ff6062; transform: translateY(-1px); }
.tf-summary { background: rgba(8,8,11,.6); border: 1px solid rgba(255,255,255,.06); border-radius: 8px; padding: 10px 12px; margin-top: 10px; display: none; }
.tf-summary.visible { display: block; }
.tf-divider { border: none; border-top: 1px solid rgba(255,255,255,.06); margin: 10px 0; }
.open-orders-bar { margin-top: 10px; border-top: 1px solid rgba(255,255,255,.06); padding-top: 10px; }
.open-orders-bar h4 { font-size: 10px; text-transform: uppercase; letter-spacing: 0.5px; color: #999DB5; font-weight: 600; margin: 0 0 8px; display: flex; justify-content: space-between; }
.open-order-row { display: flex; justify-content: space-between; align-items: center; font-size: 11px; padding: 5px 0; border-bottom: 1px solid rgba(255,255,255,.04); }
.open-order-row:last-child { border: none; }
.oor-side { font-weight: 700; font-size: 10px; text-transform: uppercase; }
.oor-cancel { font-size: 10px; color: #FF4D4F; cursor: pointer; opacity: 0.7; }
.oor-cancel:hover { opacity: 1; }
