/**
 * Exploit Analysis Styling - Professional & Accessible
 *
 * Following WCAG 2.1 AA standards:
 * - Minimum contrast ratio 4.5:1 for normal text
 * - Minimum contrast ratio 3:1 for large text
 * - No reliance on color alone for information
 * - Clear visual hierarchy
 */

/* ============================================
   EXPLOIT VIEW CONTAINER
   ============================================ */

.exploit-view-container {
    padding: 1.5rem;
    background: #ffffff;
}

/* ============================================
   EXPLOIT CARDS - Clean, Professional Design
   ============================================ */

.exploit-card {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 4px solid #2563eb !important;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    margin-bottom: 1rem;
}

.exploit-card:hover {
    box-shadow: 0 4px 6px rgba(37, 99, 235, 0.1), 0 2px 4px rgba(0, 0, 0, 0.06);
    border-left-color: #1e40af !important;
}

.exploit-card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e5e7eb;
}

.exploit-icon {
    font-size: 1.5em;
    min-width: 32px;
    text-align: center;
}

.exploit-stat-name {
    font-weight: 600;
    font-size: 1.125rem;
    color: #111827;
    flex: 1;
}

.exploit-stat-value {
    color: #2563eb;
    font-weight: 700;
    font-size: 1.25rem;
    margin-right: 0.75rem;
}

.exploit-rank-badge {
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    background: #dbeafe;
    color: #1e40af;
    border-radius: 9999px;
}

/* ============================================
   POSITION BREAKDOWN - High Contrast
   ============================================ */

.position-breakdown {
    margin: 1rem 0;
    padding: 1rem;
    background: #f9fafb;
    border-radius: 0.5rem;
    border: 1px solid #e5e7eb;
}

.position-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 1rem;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

/* Primary position - Blue with white text (contrast ratio 7.0:1) */
.position-badge.primary {
    background: #1e40af;
    color: #ffffff;
    border-color: #1e40af;
}

.position-badge.primary:hover {
    background: #1e3a8a;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(30, 64, 175, 0.2);
}

/* Secondary position - Indigo with white text (contrast ratio 7.5:1) */
.position-badge.secondary {
    background: #4f46e5;
    color: #ffffff;
    border-color: #4f46e5;
}

.position-badge.secondary:hover {
    background: #4338ca;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(79, 70, 229, 0.2);
}

/* Tertiary position - Gray with white text (contrast ratio 6.5:1) */
.position-badge.tertiary {
    background: #6b7280;
    color: #ffffff;
    border-color: #6b7280;
}

.position-badge.tertiary:hover {
    background: #4b5563;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(107, 114, 128, 0.2);
}

/* ============================================
   PLAYER EXPLOITERS LIST - Clean & Accessible
   ============================================ */

.exploiters-list {
    margin-top: 1rem;
}

.exploiters-header {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.player-exploit-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    background: #ffffff;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    border: 1px solid #e5e7eb;
}

.player-exploit-item:hover {
    background: #f9fafb;
    border-color: #2563eb;
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.1);
}

/* Elite performance indicator */
.player-exploit-item.elite {
    border-left: 3px solid #059669;
}

.player-exploit-item.elite:hover {
    background: #f0fdf4;
    border-color: #059669;
}

/* Great performance indicator */
.player-exploit-item.great {
    border-left: 3px solid #2563eb;
}

.player-exploit-item.great:hover {
    background: #eff6ff;
    border-color: #2563eb;
}

/* Good performance indicator */
.player-exploit-item.good {
    border-left: 3px solid #7c3aed;
}

.player-exploit-item.good:hover {
    background: #f5f3ff;
    border-color: #7c3aed;
}

/* ============================================
   STAR RATINGS - Gold with Dark Background
   ============================================ */

.star-rating {
    display: inline-flex;
    align-items: center;
    margin-right: 0.75rem;
    font-size: 1em;
    line-height: 1;
    min-width: 80px;
}

.star-rating.elite {
    color: #f59e0b;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

.star-rating.great {
    color: #f59e0b;
}

.star-rating.good {
    color: #f59e0b;
}

.star-rating.average {
    color: #9ca3af;
}

/* ============================================
   PLAYER INFO - High Contrast Text
   ============================================ */

.player-name {
    font-weight: 600;
    color: #111827;
    margin-right: 0.25rem;
}

/* Color coding with proper contrast */
.player-name.elite {
    color: #047857;  /* Contrast ratio 4.7:1 */
}

.player-name.great {
    color: #1d4ed8;  /* Contrast ratio 5.3:1 */
}

.player-name.good {
    color: #6d28d9;  /* Contrast ratio 5.1:1 */
}

.player-position {
    color: #6b7280;
    font-size: 0.875em;
    margin-left: 0.25rem;
    font-weight: 500;
}

.player-stat-value {
    margin-left: 0.75rem;
    color: #374151;
    font-size: 0.9375em;
    font-weight: 600;
}

/* ============================================
   PLAYER NAME BUTTONS - Clearly Clickable
   ============================================ */

.player-name-btn {
    position: relative;
    transition: all 0.2s ease;
    font-weight: 600 !important;
    text-decoration: none !important;
    border: none !important;
    border-bottom: 2px solid #93c5fd !important;
    padding-bottom: 1px !important;
    padding-left: 2px !important;
    padding-right: 2px !important;
    padding-top: 0 !important;
    border-radius: 0.25rem;
    display: inline-block;
    background: transparent !important;
    line-height: inherit !important;
    vertical-align: baseline !important;
}

.player-name-btn:hover {
    background: #eff6ff !important;
    border-bottom-color: #1d4ed8 !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(29, 78, 216, 0.2);
}

.player-name-btn:active {
    transform: translateY(0);
    background: #dbeafe !important;
}

.player-name-btn:focus {
    outline: 2px solid #2563eb !important;
    outline-offset: 2px;
    border-radius: 0.25rem;
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.25) !important;
}

/* Desktop tooltip */
@media (min-width: 769px) {
    .player-name-btn::after {
        content: "Click for details";
        position: absolute;
        bottom: 100%;
        left: 50%;
        transform: translateX(-50%) translateY(-8px);
        padding: 0.375rem 0.75rem;
        background: #111827;
        color: #ffffff;
        font-size: 0.75rem;
        font-weight: 500;
        border-radius: 0.375rem;
        white-space: nowrap;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.2s ease, transform 0.2s ease;
        z-index: 1000;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    }

    .player-name-btn:hover::after {
        opacity: 1;
        transform: translateX(-50%) translateY(-4px);
    }
}

/* Mobile - no tooltip, just visual feedback */
@media (max-width: 768px) {
    .player-name-btn {
        padding: 0.25rem 0.5rem;
        border-bottom-width: 3px !important;
        min-height: 32px;
        display: inline-flex;
        align-items: center;
    }

    .player-name-btn:active {
        transform: scale(0.97);
        background: #dbeafe;
    }
}

/* ============================================
   EMPTY STATE
   ============================================ */

.exploit-empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #6b7280;
}

.exploit-empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #d1d5db;
}

.exploit-empty-state h6 {
    margin-bottom: 0.5rem;
    color: #374151;
    font-weight: 600;
}

.exploit-empty-state p {
    font-size: 0.875rem;
    margin-bottom: 0;
    color: #6b7280;
}

/* ============================================
   VIEW TOGGLE BUTTONS
   ============================================ */

.view-toggle-group {
    display: flex;
    gap: 0.5rem;
}

.view-toggle-btn {
    transition: all 0.2s ease;
    font-weight: 600;
    letter-spacing: 0.025em;
}

.view-toggle-btn:not(.outline) {
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.view-toggle-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.view-toggle-btn:active {
    transform: translateY(0);
}

.view-toggle-btn:focus {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

/* ============================================
   LOADING STATE
   ============================================ */

.exploit-loading {
    text-align: center;
    padding: 2rem;
    color: #6b7280;
}

.exploit-loading .spinner-border {
    width: 2rem;
    height: 2rem;
    margin-bottom: 1rem;
    color: #2563eb;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 768px) {
    .exploit-view-container {
        padding: 1rem;
    }

    .player-exploit-item {
        flex-wrap: wrap;
        padding: 0.625rem 0.75rem;
    }

    .star-rating {
        font-size: 0.875em;
        min-width: 70px;
    }

    .position-badge {
        font-size: 0.8125rem;
        padding: 0.375rem 0.75rem;
    }

    .exploit-stat-name {
        font-size: 1rem;
    }

    .exploit-card-header {
        flex-wrap: wrap;
    }
}

/* ============================================
   ACCESSIBILITY ENHANCEMENTS
   ============================================ */

.player-exploit-item:focus-within {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .exploit-card {
        border-width: 3px !important;
    }

    .player-name {
        font-weight: 700;
    }

    .position-badge {
        border-width: 3px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .exploit-card,
    .player-exploit-item,
    .view-toggle-btn,
    .position-badge,
    .player-name-btn {
        transition: none;
    }
}

/* Player info toast styling */
.player-info-toast {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2) !important;
}

@media (max-width: 768px) {
    .player-info-toast {
        width: calc(100% - 40px) !important;
        max-width: 350px !important;
        left: 20px !important;
        right: 20px !important;
        top: 70px !important;
        margin: 0 auto !important;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .exploit-view-container {
        background: #1f2937;
    }

    .exploit-card {
        background: #111827;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    }

    .exploit-stat-name {
        color: #f9fafb;
    }

    .position-breakdown {
        background: #374151;
        border-color: #4b5563;
    }

    .player-exploit-item {
        background: #1f2937;
        border-color: #374151;
    }

    .player-name {
        color: #f9fafb;
    }
}
