/* ============================================
   LineupIQ Components
   ============================================ */

/* Badges & Indicators */
.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 20px;
    padding: 0 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    color: white;
}

    .status-badge.ok {
        background-color: var(--liq-accent-green);
    }

    .status-badge.mc,
    .status-badge.wd,
    .status-badge.out,
    .status-badge.dq,
    .status-badge.mdf,
    .status-badge.o {
        background-color: var(--liq-accent-red);
    }

    .status-badge.q {
        background-color: var(--liq-accent-orange);
    }

.multiplier-badge {
    font-size: 0.6rem;
    font-weight: 600;
    padding: 0.1rem 0.3rem;
    background: var(--liq-accent-yellow);
    color: #000;
    border-radius: 3px;
    margin-left: 0.25rem;
    vertical-align: middle;
}

/* Exposure Warning */
.exposure-warning-indicator {
    color: #f59e0b;
    margin-left: 6px;
    cursor: help;
    font-size: 14px;
}

    .exposure-warning-indicator:hover {
        color: #d97706;
    }

/* Filter Badges */
.entry-filter-indicator {
    margin-left: 0.75rem;
}

    .entry-filter-indicator .badge {
        font-weight: 500;
        font-size: 0.8rem;
        padding: 0.35rem 0.6rem;
    }

.clear-entry-filter {
    padding: 0.15rem 0.4rem;
    line-height: 1;
}

    .clear-entry-filter:hover {
        background: var(--liq-accent-red) !important;
        border-color: var(--liq-accent-red) !important;
        color: #fff !important;
    }

.player-filter-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.6rem;
    background: rgba(16, 185, 129, 0.15);
    color: var(--liq-accent-green);
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

    .player-filter-badge i {
        font-size: 0.75rem;
    }

.player-filter-count {
    font-weight: 700;
}

.clear-all-player-filters {
    padding: 0.2rem 0.4rem !important;
    line-height: 1;
}

    .clear-all-player-filters:hover {
        background: var(--liq-accent-red) !important;
        border-color: var(--liq-accent-red) !important;
        color: #fff !important;
    }

/* Filter Buttons */
.btn-lineup-filter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 0;
    border: none;
    background: transparent;
    color: var(--liq-text-secondary);
    cursor: pointer;
    opacity: 0.35;
    transition: color 0.15s ease, opacity 0.15s ease;
    font-size: 0.85rem;
}

    .btn-lineup-filter:hover {
        opacity: 1;
        color: var(--liq-accent-green);
    }

    .btn-lineup-filter.active {
        opacity: 1;
        color: var(--liq-accent-green);
    }

.btn-entry-filter {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    padding: 0;
    border: none;
    background: transparent;
    color: var(--liq-text-secondary);
    border-radius: 4px;
    cursor: pointer;
    opacity: 0.5;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

    .btn-entry-filter:hover {
        opacity: 1;
        background: var(--liq-bg-hover);
        color: var(--liq-accent-green);
    }

    .btn-entry-filter.active {
        opacity: 1;
        color: var(--liq-accent-green);
        background: rgba(16, 185, 129, 0.15);
    }

/* Button Styling Overrides */
.panel-header .btn-outline-secondary,
.player-grid-header .btn-outline-secondary,
.player-grid-subheader .btn-outline-secondary,
.lineup-panel-toolbar .btn-outline-secondary {
    border-color: var(--liq-border-color);
    color: var(--liq-text-primary);
    background-color: transparent;
}

/* Button states */
.panel-header .btn-group.show > .btn-outline-secondary,
.panel-header .dropdown.show > .btn-outline-secondary,
.panel-header .btn-outline-secondary[aria-expanded="true"],
.panel-header .btn-outline-secondary:focus,
.player-grid-header .btn-group.show > .btn-outline-secondary,
.player-grid-header .dropdown.show > .btn-outline-secondary,
.player-grid-header .btn-outline-secondary[aria-expanded="true"],
.player-grid-header .btn-outline-secondary:focus,
.player-grid-subheader .btn-group.show > .btn-outline-secondary,
.player-grid-subheader .dropdown.show > .btn-outline-secondary,
.player-grid-subheader .btn-outline-secondary[aria-expanded="true"],
.player-grid-subheader .btn-outline-secondary:focus,
.lineup-panel-toolbar .btn-group.show > .btn-outline-secondary,
.lineup-panel-toolbar .dropdown.show > .btn-outline-secondary,
.lineup-panel-toolbar .btn-outline-secondary[aria-expanded="true"],
.lineup-panel-toolbar .btn-outline-secondary:focus {
    background-color: transparent !important;
    border-color: var(--liq-accent-green) !important;
    color: var(--liq-text-primary) !important;
    box-shadow: none !important;
}

.panel-header .btn-outline-secondary:hover,
.player-grid-header .btn-outline-secondary:hover,
.player-grid-subheader .btn-outline-secondary:hover,
.lineup-panel-toolbar .btn-outline-secondary:hover {
    background-color: transparent !important;
    border-color: var(--liq-accent-green) !important;
    color: var(--liq-text-primary) !important;
}

.panel-header .btn-outline-secondary:active,
.player-grid-header .btn-outline-secondary:active,
.player-grid-subheader .btn-outline-secondary:active,
.lineup-panel-toolbar .btn-outline-secondary:active {
    background-color: var(--liq-accent-green-active) !important;
    border-color: var(--liq-accent-green) !important;
    color: var(--liq-text-primary) !important;
}

/* Special Buttons */
.btn-payouts-info {
    background: transparent;
    border: none;
    color: var(--liq-text-secondary);
    padding: 0.125rem 0.25rem;
    cursor: pointer;
    transition: color 0.15s ease;
    font-size: 0.9rem;
    line-height: 1;
}

    .btn-payouts-info:hover {
        color: var(--liq-accent-green);
    }

    .btn-payouts-info:focus {
        outline: none;
        box-shadow: none;
    }

.btn-remove-player {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    padding: 0;
    border: none;
    background: transparent;
    color: var(--liq-text-secondary);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s ease;
    opacity: 0.4;
}

    .btn-remove-player:hover {
        background: rgba(239, 68, 68, 0.1);
        color: var(--liq-accent-red);
        opacity: 1;
    }

    .btn-remove-player i {
        font-size: 0.8rem;
    }

/* View Toggle Button */
#lineupViewToggle .btn {
    border-color: var(--liq-border-color);
    color: var(--liq-text-secondary);
    background: transparent;
}

    #lineupViewToggle .btn:hover {
        border-color: var(--liq-accent-green);
        color: var(--liq-text-primary);
        background: transparent;
    }

    #lineupViewToggle .btn.active {
        background: var(--liq-accent-green) !important;
        border-color: var(--liq-accent-green) !important;
        color: #fff !important;
    }

#toggleLineupViewBtn {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

    #toggleLineupViewBtn i {
        font-size: 0.85rem;
    }

/* Position Filter */
#positionFilterGroup .btn {
    padding: 0.25rem 0.6rem;
    font-size: 0.8rem;
}

    #positionFilterGroup .btn.active {
        background: var(--liq-accent-green) !important;
        border-color: var(--liq-accent-green) !important;
        color: white !important;
    }

/* Generate Button */
#generateLineupsBtn {
    min-width: 115px;
}

/* Icon Elements */
.lock-icon {
    transition: color 0.15s ease, transform 0.15s ease;
}

    .lock-icon:hover:not([data-is-disabled="true"]) {
        transform: scale(1.2);
    }

    .lock-icon[data-is-disabled="true"]:not([data-is-locked="true"]) {
        cursor: not-allowed !important;
    }

.bookmark-icon {
    transition: color 0.15s ease, transform 0.15s ease;
}

    .bookmark-icon:hover {
        transform: scale(1.2);
    }

/* Player Link */
.player-link {
    position: relative;
    padding: 2px 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

    .player-link::after {
        content: '';
        position: absolute;
        width: 0;
        height: 1px;
        bottom: 0;
        left: 50%;
        background-color: currentColor;
        transition: all 0.2s ease;
    }

    .player-link:hover::after {
        width: calc(100% - 8px);
        left: 4px;
    }

    .player-link:hover {
        color: var(--liq-accent-green) !important;
    }

/* Progress Indicators */
.metric-bar-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.metric-bar-track {
    flex: 1;
    height: 6px;
    background: var(--liq-bg-tertiary);
    border-radius: 3px;
    overflow: hidden;
}

.metric-bar-fill {
    height: 100%;
    background: var(--liq-accent-green);
    border-radius: 3px;
    transition: width 0.3s ease;
}

    .metric-bar-fill.bar-warning {
        background: var(--liq-accent-yellow);
    }

    .metric-bar-fill.bar-danger {
        background: var(--liq-accent-red);
    }

.metric-bar-value {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--liq-text-primary);
    min-width: 45px;
    text-align: right;
}

/* Animation Utilities */
.generation-progress-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--liq-accent-green);
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.7;
        transform: scale(1.1);
    }
}

#refreshProjectionsBtn i {
    display: inline-block;
}

    #refreshProjectionsBtn i.spin-animation {
        animation: spin 1s linear infinite;
    }

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Highlight Classes */
.highlight-success {
    color: var(--liq-accent-green) !important;
    font-weight: 600;
}

.highlight-warning {
    color: var(--liq-accent-yellow) !important;
    font-weight: 600;
}

.highlight-danger {
    color: var(--liq-accent-red) !important;
    font-weight: 600;
}

/* Empty Slot Text */
.empty-slot-text {
    color: var(--liq-text-secondary);
    font-style: normal;
}

/* Coming Soon Indicator */
.coming-soon-dot {
    width: 6px;
    height: 6px;
    background: var(--liq-accent-yellow);
    border-radius: 50%;
    position: absolute;
    top: 0.375rem;
    right: 0.375rem;
}

/* Value Change Indicators */
.import-value-changed {
    color: var(--liq-accent-green);
    font-weight: 600;
}

.import-value-new {
    font-size: 0.7rem;
    color: var(--liq-text-secondary);
    margin-left: 0.25rem;
}

/* Mobile Tab Badges */
.mobile-tab-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.125rem 0.5rem;
    border-radius: 10px;
    font-size: 0.75rem;
    min-width: 1.5rem;
    text-align: center;
}

.mobile-panel-tab:not(.active) .mobile-tab-badge {
    background: var(--liq-accent-green);
    color: white;
}

.mobile-tab-badge:empty {
    display: none;
}

/* Contest-specific button styling (blue theme) */
.contests-header .btn-outline-secondary {
    border-color: var(--liq-border-color);
    color: var(--liq-text-primary);
    background-color: transparent;
}

    .contests-header .btn-outline-secondary:hover {
        background-color: transparent !important;
        border-color: var(--liq-accent-blue) !important;
        color: var(--liq-text-primary) !important;
    }

    .contests-header .btn-outline-secondary:focus,
    .contests-header .btn-outline-secondary[aria-expanded="true"] {
        background-color: transparent !important;
        border-color: var(--liq-accent-blue) !important;
        color: var(--liq-text-primary) !important;
        box-shadow: none !important;
    }

    .contests-header .btn-outline-secondary:active {
        background-color: rgba(59, 130, 246, 0.1) !important;
        border-color: var(--liq-accent-blue) !important;
        color: var(--liq-text-primary) !important;
    }

    .contests-header .btn-outline-secondary.active {
        background: var(--liq-accent-blue) !important;
        border-color: var(--liq-accent-blue) !important;
        color: #fff !important;
    }

/* ============================================
   Toast Notifications
   ============================================ */
.liq-toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.25rem;
    background: var(--liq-bg-primary);
    border: 1px solid var(--liq-border-color);
    border-radius: 8px;
    box-shadow: var(--liq-shadow-lg, 0 10px 25px rgba(0, 0, 0, 0.15));
    z-index: 10001;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

    .liq-toast.show {
        opacity: 1;
        transform: translateY(0);
    }

    .liq-toast i {
        font-size: 1.25rem;
    }

    .liq-toast span {
        font-size: 0.9rem;
        color: var(--liq-text-primary);
    }

.liq-toast-success {
    border-left: 4px solid var(--liq-accent-green);
}

    .liq-toast-success i {
        color: var(--liq-accent-green);
    }

.liq-toast-error {
    border-left: 4px solid var(--liq-accent-red);
}

    .liq-toast-error i {
        color: var(--liq-accent-red);
    }

.liq-toast-warning {
    border-left: 4px solid var(--liq-accent-yellow);
}

    .liq-toast-warning i {
        color: var(--liq-accent-yellow);
    }

.liq-toast-info {
    border-left: 4px solid var(--liq-accent-blue);
}

    .liq-toast-info i {
        color: var(--liq-accent-blue);
    }

@media (max-width: 768px) {
    .liq-toast {
        left: 20px;
        right: 20px;
        bottom: 10px;
    }
}