/**
 * Prediction Management System CSS
 * Common stylesheet for Prediction Events, Markets, and Intelligence Modules
 * File: public/css/prediction.css
 */

/* ==========================================================================
   1. Origin Badges (Admin Manual vs Intelligence API vs Agent Suggestion)
   ========================================================================== */
.badge-origin {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.badge-origin-manual {
    background-color: rgba(13, 110, 253, 0.12);
    color: #0d6efd;
    border: 1px solid rgba(13, 110, 253, 0.25);
}

.badge-origin-api {
    background-color: rgba(111, 66, 193, 0.12);
    color: #8b5cf6;
    border: 1px solid rgba(111, 66, 193, 0.25);
}

.badge-origin-agent {
    background-color: rgba(13, 202, 240, 0.12);
    color: #0dcaf0;
    border: 1px solid rgba(13, 202, 240, 0.25);
}

/* ==========================================================================
   2. Status Badges & Lifecycle
   ========================================================================== */
.badge-status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 4px;
    text-transform: capitalize;
}

.badge-status-draft {
    background-color: rgba(108, 117, 125, 0.15);
    color: #adb5bd;
    border: 1px solid rgba(108, 117, 125, 0.3);
}

.badge-status-open {
    background-color: rgba(25, 135, 84, 0.15);
    color: #20c997;
    border: 1px solid rgba(25, 135, 84, 0.3);
}

.badge-status-closed {
    background-color: rgba(255, 193, 7, 0.15);
    color: #ffc107;
    border: 1px solid rgba(255, 193, 7, 0.3);
}

.badge-status-resolved {
    background-color: rgba(13, 110, 253, 0.15);
    color: #0d6efd;
    border: 1px solid rgba(13, 110, 253, 0.3);
}

.badge-status-rejected {
    background-color: rgba(220, 53, 69, 0.15);
    color: #dc3545;
    border: 1px solid rgba(220, 53, 69, 0.3);
}

/* ==========================================================================
   3. Single vs Multi Option Controls & Forms
   ========================================================================== */
.prediction-form-card {
    border-radius: 8px;
    transition: all 0.2s ease-in-out;
}

.option-card {
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    background: rgba(255, 255, 255, 0.02);
    margin-bottom: 14px;
    transition: border-color 0.2s ease;
}

.option-card:hover {
    border-color: rgba(111, 66, 193, 0.35) !important;
}

.option-card .card-header {
    background: rgba(255, 255, 255, 0.04) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding: 8px 14px;
}

.source-row {
    background: rgba(255, 255, 255, 0.02);
    padding: 6px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* ==========================================================================
   4. Price Sum Tracker & Warnings
   ========================================================================== */
.price-sum-badge {
    font-size: 13px;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.price-sum-valid {
    background-color: rgba(25, 135, 84, 0.15);
    color: #20c997;
    border: 1px solid rgba(25, 135, 84, 0.3);
}

.price-sum-invalid {
    background-color: rgba(220, 53, 69, 0.2);
    color: #ff6b6b;
    border: 1px solid rgba(220, 53, 69, 0.4);
    animation: pulseAlert 1.5s infinite;
}

@keyframes pulseAlert {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

/* ==========================================================================
   5. Helper Alerts & Notices (Image defaults, Binary lock)
   ========================================================================== */
.prediction-info-notice {
    font-size: 11.5px;
    line-height: 1.45;
    padding: 8px 12px;
    border-radius: 6px;
    background-color: rgba(13, 202, 240, 0.08);
    border: 1px solid rgba(13, 202, 240, 0.22);
    color: #93c5fd;
    margin-top: 6px;
}

.prediction-lock-notice {
    font-size: 12.5px;
    line-height: 1.5;
    padding: 10px 14px;
    border-radius: 6px;
    background-color: rgba(13, 110, 253, 0.08);
    border: 1px solid rgba(13, 110, 253, 0.25);
    color: #60a5fa;
}

/* ==========================================================================
   6. Table Enhancements for Prediction Events
   ========================================================================== */
.prediction-table td {
    vertical-align: middle;
}

.prediction-event-thumb {
    width: 44px;
    height: 44px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: #111;
}

.prediction-subtext {
    font-size: 12px;
    color: #8b949e;
}

/* ==========================================================================
   7. Number Inputs: Disable Spinners, Typing Only
   ========================================================================== */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
    -webkit-appearance: none !important;
    margin: 0 !important;
}

input[type=number] {
    -moz-appearance: textfield !important;
    appearance: textfield !important;
}

/* Prediction table inputs & addon background theme alignment */
.table .form-control,
.form-control.market-admin-fee,
.form-control.market-agent-fee,
.form-control.market-loss-limit {
    background-color: #0b1438 !important;
    border-color: #1f2b5c !important;
    color: #f2f4ff !important;
}
.table .input-group-text {
    background-color: #16214d !important;
    border-color: #1f2b5c !important;
    color: #f2f4ff !important;
}
