/* ESoccer Prediction System - Custom Styles */

/* Prediction badges */
.badge-home { background-color: #198754; }
.badge-draw { background-color: #ffc107; color: #000; }
.badge-away { background-color: #0d6efd; }

/* Probability bars */
.prob-bar-container {
    width: 100%;
    height: 8px;
    background-color: #2c2c2c;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 4px;
}

.prob-bar {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
}

.prob-home { background-color: #198754; }
.prob-draw { background-color: #ffc107; }
.prob-away { background-color: #0d6efd; }

/* Confidence indicator */
.conf-high { color: #198754; }
.conf-medium { color: #ffc107; }
.conf-low { color: #dc3545; }

/* Table styles */
.table-hover tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.sortable {
    cursor: pointer;
    user-select: none;
}

.sortable:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Sticky table header */
.table-responsive .sticky-top {
    position: sticky;
    top: 0;
    z-index: 1;
}

/* Prediction row coloring */
.pred-row-home { border-left: 3px solid #198754; }
.pred-row-draw { border-left: 3px solid #ffc107; }
.pred-row-away { border-left: 3px solid #0d6efd; }

/* Result badges */
.result-home { color: #198754; font-weight: bold; }
.result-draw { color: #ffc107; font-weight: bold; }
.result-away { color: #0d6efd; font-weight: bold; }

/* Card hover effect */
.card {
    transition: border-color 0.2s ease;
}

/* Form styling */
.form-control:focus, .form-select:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.15rem rgba(13, 110, 253, 0.25);
}

/* Stats search */
#search-input {
    background-color: #2c2c2c;
    border-color: #444;
    color: #fff;
}

#search-input::placeholder {
    color: #888;
}

/* Loading overlay */
.loading-overlay {
    position: relative;
}

.loading-overlay::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

/* Win rate bar in stats table */
.winrate-bar {
    display: inline-block;
    height: 6px;
    border-radius: 3px;
    background-color: #198754;
    vertical-align: middle;
    margin-left: 4px;
}

/* Filter bar */
.form-control-sm, .form-select-sm {
    background-color: #2c2c2c;
    border-color: #444;
    color: #fff;
}

.form-control-sm::placeholder {
    color: #888;
}

/* Accuracy trend bar */
#recent-trend div:hover {
    opacity: 0.8;
}

/* Table row for wrong predictions in accuracy log */
.table-danger.bg-opacity-10 {
    background-color: rgba(220, 53, 69, 0.1) !important;
}

/* Progress bar styling */
.progress {
    background-color: #2c2c2c;
}

/* Kelly Calculator styles */
.kelly-value-row {
    background-color: rgba(25, 135, 84, 0.08) !important;
}

.kelly-no-value {
    opacity: 0.6;
}

.kelly-dont-bet {
    font-size: 0.7rem;
    padding: 2px 6px;
}

/* Bet selection styles */
.bet-selected {
    background-color: rgba(255, 193, 7, 0.15) !important;
    border-left: 3px solid #ffc107 !important;
}

.bet-selected td[data-col="league"]::before {
    content: '\2713 ';
    color: #ffc107;
    font-weight: bold;
}

tr[data-selectable] {
    cursor: pointer;
}

tr[data-selectable]:hover {
    background-color: rgba(255, 255, 255, 0.05) !important;
}

/* Simulator styles */
.sim-summary-card {
    text-align: center;
    padding: 12px 8px;
}

.sim-summary-card .sim-value {
    font-size: 1.5rem;
    font-weight: bold;
}

.sim-summary-card .sim-label {
    font-size: 0.75rem;
    color: #888;
    text-transform: uppercase;
}

/* P&L curve bars */
.pnl-bar-container {
    display: flex;
    align-items: flex-end;
    gap: 1px;
    height: 150px;
    border-bottom: 1px solid #444;
    position: relative;
}

.pnl-bar-container .pnl-zero-line {
    position: absolute;
    left: 0;
    right: 0;
    border-top: 1px dashed #666;
}

.pnl-bar {
    flex: 1;
    min-width: 2px;
    transition: height 0.3s ease;
    border-radius: 1px 1px 0 0;
}

.pnl-bar.positive {
    background-color: #198754;
}

.pnl-bar.negative {
    background-color: #dc3545;
}

.pnl-bar:hover {
    opacity: 0.8;
}

/* Breakdown table styles */
.sim-breakdown th {
    font-size: 0.8rem;
    text-transform: uppercase;
    color: #888;
}

.sim-breakdown td {
    font-size: 0.85rem;
}

/* Day-of-week checkboxes in simulator */
.dow-checks .form-check {
    display: inline-block;
    margin-right: 8px;
}

.dow-checks .form-check-label {
    font-size: 0.8rem;
}

/* Multi-select dropdown */
.multi-select-wrapper {
    position: relative;
}

.multi-select-wrapper .ms-display {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    overflow: hidden;
    cursor: pointer;
    background-color: #2c2c2c;
    border: 1px solid #444;
    border-radius: 0.25rem;
    padding: 0.25rem 2rem 0.25rem 0.5rem;
    min-height: 31px;
    font-size: 0.875rem;
    color: #fff;
    position: relative;
}

.multi-select-wrapper .ms-display::after {
    content: '';
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid #aaa;
    pointer-events: none;
}

.multi-select-wrapper .ms-display .ms-chip {
    background-color: #0d6efd;
    color: #fff;
    border-radius: 3px;
    padding: 0 6px;
    margin-right: 3px;
    font-size: 0.75rem;
    white-space: nowrap;
    line-height: 1.5;
}

.multi-select-wrapper .ms-display .ms-placeholder {
    color: #888;
}

.multi-select-wrapper .ms-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1050;
    background-color: #2c2c2c;
    border: 1px solid #555;
    border-radius: 0.25rem;
    max-height: 200px;
    overflow-y: auto;
    margin-top: 2px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}

.multi-select-wrapper .ms-dropdown.show {
    display: block;
}

.multi-select-wrapper .ms-dropdown .ms-option {
    padding: 4px 10px;
    cursor: pointer;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.multi-select-wrapper .ms-dropdown .ms-option:hover {
    background-color: rgba(13, 110, 253, 0.2);
}

.multi-select-wrapper .ms-dropdown .ms-option.selected {
    background-color: rgba(13, 110, 253, 0.15);
}

.multi-select-wrapper .ms-dropdown .ms-option .ms-check {
    width: 14px;
    height: 14px;
    border: 1px solid #666;
    border-radius: 2px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.multi-select-wrapper .ms-dropdown .ms-option.selected .ms-check {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.multi-select-wrapper .ms-dropdown .ms-option.selected .ms-check::after {
    content: '\2713';
    color: #fff;
    font-size: 0.65rem;
}

/* Column toggle panel */
.col-panel {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease, margin-top 0.25s ease, opacity 0.2s ease;
    opacity: 0;
    margin-top: 0;
}

.col-panel.open {
    max-height: 60px;
    opacity: 1;
    margin-top: 8px;
}

.col-panel-inner {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
    padding: 6px 0 2px;
    border-top: 1px solid #333;
}

.col-panel-label {
    font-size: 0.7rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-right: 2px;
}

.col-pill {
    border: 1px solid #444;
    background: transparent;
    color: #555;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.15s ease;
    line-height: 1.4;
}

.col-pill:hover {
    border-color: #666;
    color: #aaa;
}

.col-pill.active {
    background: rgba(13, 110, 253, 0.15);
    border-color: #0d6efd;
    color: #6ea8fe;
}

/* Simulator filter panel */
.sim-filters .form-label {
    font-size: 0.8rem;
    color: #aaa;
    margin-bottom: 2px;
}
