/**
 * The Spin The Wheel — Page Module: weighted-wheel.css
 */

/* ==========================================================================
   Weighted Wheel Specific Component Styles
   ========================================================================== */
.pointer-hud-badge {
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 23, 42, 0.88);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 0.35rem 0.85rem;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    z-index: 10;
    font-size: 0.825rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    pointer-events: none;
    transition: all 0.15s ease;
}

.hud-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #f59e0b;
    flex-shrink: 0;
}

.hud-label {
    font-weight: 700;
    color: var(--text-primary);
    max-width: 140px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hud-pct {
    font-weight: 800;
    color: #38bdf8;
}

.hud-odds {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.prob-distribution-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
    margin-top: 1rem;
}

.prob-bar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
}

.prob-bar-title {
    font-weight: 700;
    color: var(--text-secondary);
}

.prob-bar-sum {
    font-weight: 800;
    font-size: 0.8rem;
    color: #10b981;
}

.prob-stacked-bar {
    width: 100%;
    height: 18px;
    border-radius: 6px;
    overflow: hidden;
    display: flex;
    background: rgba(255, 255, 255, 0.05);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
}

.prob-bar-segment {
    height: 100%;
    transition: width 0.25s ease, opacity 0.15s ease;
    cursor: pointer;
    position: relative;
}

.prob-bar-segment:hover {
    opacity: 0.85;
    filter: brightness(1.2);
}

.weighted-actions-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.weight-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.65rem;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #10b981;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
}

.weight-status-pill.warning {
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.3);
    color: #f59e0b;
}

.status-indicator-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.weighted-action-btns {
    display: flex;
    gap: 0.35rem;
}

.btn-accent-chip {
    background: var(--accent-blue) !important;
    color: #ffffff !important;
    border-color: transparent !important;
}

.weighted-entries-container {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    max-height: 290px;
    overflow-y: auto;
    padding-right: 0.25rem;
    margin-bottom: 0.75rem;
}

.weighted-entry-row {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    padding: 0.4rem 0.6rem;
    border-radius: var(--radius-sm);
    transition: border-color 0.15s ease;
}

.weighted-entry-row:hover {
    border-color: rgba(255, 255, 255, 0.2);
}

.entry-color-picker {
    width: 24px;
    height: 24px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    background: none;
    padding: 0;
    flex-shrink: 0;
}

.entry-label-input {
    flex: 1;
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    padding: 0.35rem 0.55rem;
    border-radius: 4px;
    font-size: 0.85rem;
    min-width: 80px;
}

.entry-weight-input {
    width: 62px;
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    padding: 0.35rem 0.45rem;
    border-radius: 4px;
    font-size: 0.85rem;
    text-align: right;
    font-weight: 700;
}

.entry-pct-pill {
    min-width: 50px;
    text-align: right;
    font-size: 0.75rem;
    font-weight: 800;
    color: #38bdf8;
    flex-shrink: 0;
}

.entry-delete-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.1rem;
    line-height: 1;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    transition: color 0.15s ease, background 0.15s ease;
}

.entry-delete-btn:hover {
    color: #f43f5e;
    background: rgba(244, 63, 94, 0.1);
}

.preset-chips-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.35rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .weighted-actions-row {
        flex-direction: column;
        align-items: stretch;
    }
    .weighted-action-btns {
        justify-content: flex-end;
    }
    .pointer-hud-badge {
        max-width: 90%;
        top: 6px;
    }
}

/* Mode Selection Pills */
.mode-pills-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-bottom: 0.85rem;
}

.mode-pill {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.55rem 0.65rem;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s ease;
    min-height: 48px;
    box-sizing: border-box;
}

.mode-pill:hover {
    color: var(--text-primary);
    background: var(--bg-card-hover, rgba(255, 255, 255, 0.08));
    border-color: var(--border-accent);
}

.mode-pill.active {
    background: rgba(99, 102, 241, 0.15);
    border-color: var(--primary);
    color: var(--primary);
}

.mode-pill-title {
    font-size: 0.85rem;
    font-weight: 700;
}

.mode-pill-sub {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.mode-pill.active .mode-pill-sub {
    color: #a5b4fc;
}

/* Tool & Slice Chips */
.tool-chip-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.45rem 0.75rem;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.775rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    min-height: 34px;
    white-space: nowrap;
}

.tool-chip-btn:hover {
    color: var(--text-primary);
    background: var(--bg-card-hover, rgba(255, 255, 255, 0.08));
    border-color: var(--border-accent);
}

.tool-chip-btn.active {
    color: var(--primary);
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.15);
}

.slice-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.7rem;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-pill);
    color: var(--text-secondary);
    font-size: 0.775rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    min-height: 32px;
}

.slice-chip:hover {
    color: var(--text-primary);
    border-color: var(--border-accent);
}

.slice-chip.active {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
}

@media (max-width: 768px) {
    .weighted-action-btns {
        flex-wrap: wrap;
        width: 100%;
        gap: 0.4rem;
        justify-content: flex-start;
    }
    .weighted-action-btns .tool-chip-btn {
        flex: 1 1 auto;
        min-height: 38px;
    }
}
