/* ============================================================
   SFMaks Admin — Shared Controls & Utility Classes
   ============================================================ */

/* --- Filter Active State --- */
.filter-active,
input.filter-active,
select.filter-active {
    background-color: #dcfce7 !important;
    border-color: #86efac !important;
}
.ms-choice.filter-active {
    background-color: #dcfce7 !important;
    border-color: #86efac !important;
}

/* --- Icon Actions (small, 22×22 — table rows) --- */
.icon-action-sm {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 4px;
    transition: background 0.15s ease, box-shadow 0.15s ease;
    vertical-align: middle;
}
.icon-action-sm:hover {
    background: var(--admin-primary-50, rgba(99,102,241,.08));
    box-shadow: 0 0 0 2px rgba(99,102,241,.15);
}
.icon-action-sm i {
    font-size: 14px;
    color: var(--admin-text-secondary, #64748b);
}
.icon-action-sm:hover i {
    color: var(--admin-primary, #6366f1);
}

/* --- Icon Actions (large, 30×30 — order-view panel) --- */
.icon-action {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    transition: background 0.15s ease, box-shadow 0.15s ease;
    float: right;
}
.icon-action:hover {
    background: var(--admin-primary-50, rgba(99,102,241,.08));
    box-shadow: 0 0 0 2px rgba(99,102,241,.15);
}
.icon-action i {
    font-size: 16px;
    color: var(--admin-text-secondary, #64748b);
}
.icon-action:hover i {
    color: var(--admin-primary, #6366f1);
}

/* --- Status Badges (payment) --- */
.status-badge {
    display: inline-block;
    border-radius: 6px;
    padding: 5px 14px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.02em;
    line-height: 1.4;
    white-space: nowrap;
}
.status-badge--unpaid {
    background: var(--admin-danger, #ef4444);
    color: #fff;
}
.status-badge--paid {
    background: var(--admin-success, #10b981);
    color: #fff;
}
.status-badge--partial {
    background: var(--admin-info, #3b82f6);
    color: #fff;
}

/* --- Confirmation Icons --- */
.fa-check-circle.confirmed {
    color: var(--admin-success, #10b981);
    cursor: pointer;
}
.fa-exclamation-triangle.unconfirmed {
    color: var(--admin-danger, #ef4444);
    cursor: pointer;
}

/* --- Chat Bubbles --- */
.chat-bubble {
    background: #f0f8ff;
    border: 1px solid #c0d8e8;
    border-radius: 8px;
    padding: 10px 14px;
    margin: 6px 0;
    font-size: 13px;
    line-height: 1.5;
}
.chat-bubble--seller {
    background: #f0fdf4;
    border-color: #bbf7d0;
}

/* --- Order Timeline --- */
.order-timeline {
    list-style: none;
    margin: 0;
    padding: 0 0 0 14px;
    border-left: 2px solid var(--admin-border, #e2e8f0);
}
.order-timeline li {
    position: relative;
    margin: 0 0 16px 14px;
}
.order-timeline li::before {
    content: "";
    position: absolute;
    left: -20px;
    top: 5px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid var(--admin-primary, #6366f1);
}
.order-timeline .tl-time {
    margin-bottom: 3px;
    font-size: 11px;
    font-weight: 600;
    color: var(--admin-text-muted, #94a3b8);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.order-timeline .tl-body {
    font-size: 13px;
    color: var(--admin-text-secondary, #64748b);
}

/* --- Panel Action Buttons (PNG icon panels) --- */
.panel-action-btn {
    display: inline-block;
    text-align: center;
    width: 96px;
    height: 128px;
    text-decoration: none;
    vertical-align: top;
    margin-right: 7px;
    border-radius: 8px;
    transition: background 0.15s ease;
}
.panel-action-btn:hover {
    background: var(--admin-surface-hover, #f1f5f9);
    text-decoration: none;
}
.panel-action-btn .panel-action-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    margin: 8px auto 4px;
    border-radius: 16px;
    background: var(--admin-primary-50, rgba(99,102,241,.08));
    transition: background 0.15s ease;
}
.panel-action-btn:hover .panel-action-icon {
    background: rgba(99,102,241,.15);
}
.panel-action-btn .panel-action-icon i {
    font-size: 28px;
    color: var(--admin-primary, #6366f1);
}
.panel-action-btn .panel-action-caption {
    display: block;
    margin-top: 4px;
    color: var(--admin-text-secondary, #64748b);
    font-size: 11px;
    font-weight: 500;
    line-height: 1.2;
}

/* --- Sort Indicators (replace PNG images) --- */
.sort-indicator {
    display: inline-block;
    width: 0;
    height: 0;
    margin-left: 5px;
    vertical-align: middle;
    opacity: 0.5;
}
.sort-indicator--asc {
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-bottom: 5px solid currentColor;
}
.sort-indicator--desc {
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid currentColor;
}

/* --- Table Column Widths (replace inline styles) --- */
.col-w-xs { width: 60px; }
.col-w-sm { width: 80px; }
.col-w-md { width: 100px; }
.col-w-lg { width: 150px; }

/* --- Scrollable Panel Body --- */
.panel-body-scroll {
    max-height: 400px;
    overflow-y: auto;
}

/* --- Hidden Form Inputs --- */
.sr-only-input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    border: 0;
}
