/* ============================================================
   Escrow Service — Only escrow-specific additions.
   All header/nav/breadcrumb/footer/table styling comes from
   the forum's own global.css + custom.css loaded in <head>.
   ============================================================ */

/* Escrow two-column layout: sidebar + content */
.escrow-layout {
    display: flex;
    gap: 0;
    margin-top: 15px;
}
.escrow-sidebar {
    width: 200px;
    flex-shrink: 0;
}
.escrow-sidebar .sidebar-link {
    display: block;
    padding: 8px 10px;
    color: #e3e3e3;
    font-size: 13px;
    border-bottom: 1px solid #2a2a2a;
}
.escrow-sidebar .sidebar-link:hover {
    background-color: #1c1c1c;
}
.escrow-sidebar .sidebar-link.active {
    background-color: var(--theme-primary-color);
    color: #fff;
}
.escrow-sidebar .sidebar-link i {
    color: var(--theme-secondary-color);
    width: 20px;
    text-align: center;
    margin-right: 8px;
}
.escrow-sidebar .sidebar-link.active i { color: #fff; }

.escrow-content {
    flex: 1;
    min-width: 0;
    margin-left: 15px;
}

/* Status labels */
.status {
    display: inline-block;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: bold;
    border-radius: 3px;
}
.status-pending { background: #7f8c8d; color: #fff; }
.status-accepted { background: var(--theme-primary-color); color: #fff; }
.status-awaiting { background: #8e44ad; color: #fff; }
.status-paid { background: #27ae60; color: #fff; }
.status-disputed { background: #e74c3c; color: #fff; }
.status-finalize { background: #f39c12; color: #fff; }
.status-completed { background: #2ecc71; color: #fff; }
.status-cancelled { background: #95a5a6; color: #fff; }
.status-expired { background: #555; color: #999; }

/* Stats row */
.stats-row {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}
.stat-box {
    flex: 1;
    background: #2a2a2a;
    border: 1px solid #333;
    padding: 12px;
    text-align: center;
    border-radius: 3px;
}
.stat-box .stat-value {
    font-size: 24px;
    font-weight: bold;
    color: var(--theme-secondary-color);
}
.stat-box .stat-label { font-size: 11px; color: #999; margin-top: 3px; }

/* ===== Global button normalizer ===== */
/* Ensures all .button elements (input, a, button) look identical */
.escrow-content .button,
.escrow-content input[type="submit"].button,
.escrow-content input[type="button"].button,
.escrow-content a.button {
    padding: 8px 16px !important;
    font-size: 13px !important;
    line-height: 1.4 !important;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
    text-decoration: none;
    cursor: pointer;
    border: none;
    height: auto;
}

/* Deal actions row */
.deal-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: stretch; }
.deal-actions .button {
    min-width: 120px;
}

/* Small variant for inline table buttons */
.escrow-content .button[style*="font-size:11px"],
.escrow-content .button[style*="font-size: 11px"] {
    padding: 5px 12px !important;
    font-size: 11px !important;
}

/* Filter buttons row */
.escrow-content .button + .button {
    vertical-align: middle;
}

/* Chat */
.chat-container {
    max-height: 400px;
    overflow-y: auto;
    background: #1c1c1c;
    padding: 10px;
}
.chat-message {
    display: flex;
    gap: 8px;
    padding: 8px 0;
    border-bottom: 1px solid #2a2a2a;
}
.chat-message:last-child { border-bottom: none; }
.chat-avatar { width: 32px; height: 32px; border-radius: 3px; flex-shrink: 0; }
.chat-body { flex: 1; }
.chat-meta { font-size: 11px; color: #999; margin-bottom: 2px; }
.chat-meta strong { color: var(--theme-secondary-color); }
.chat-text { font-size: 13px; }
.chat-input { display: flex; gap: 8px; }
.chat-input .textbox { flex: 1; }

/* Flash messages */
.flash {
    padding: 10px;
    margin-bottom: 10px;
    font-size: 13px;
    border-radius: 3px;
}
.flash-success { background: rgba(46, 204, 113, 0.15); border: 1px solid #2ecc71; color: #2ecc71; }
.flash-error { background: rgba(231, 76, 60, 0.15); border: 1px solid #e74c3c; color: #e74c3c; }
.flash-info { background: rgba(52, 152, 219, 0.15); border: 1px solid #3498db; color: #3498db; }

/* User search autocomplete */
#user-results {
    background: var(--main-content-bg-color);
    border: 1px solid #2a2a2a;
    border-top: 1px solid var(--theme-secondary-color);
}

/* Responsive */
@media (max-width: 900px) {
    .escrow-layout { flex-direction: column; }
    .escrow-sidebar { width: 100%; }
    .escrow-content { margin-left: 0; margin-top: 10px; }
    .stats-row { flex-wrap: wrap; }
    .stat-box { min-width: 45%; }
}
