﻿/* Sports Results Container */
.srm-sports-results-container {
    width: 100%;
    background: #1a1a1a;
    padding: 10px;
    border-radius: 0;
    overflow: hidden;
}

/* Content Layout - Flex container for select + carousel */
.srm-content-layout {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Sport Selector - Dropdown */
.srm-sport-selector {
    flex-shrink: 0;
}

.srm-sport-dropdown {
    background: #2a2a2a;
    color: #ffffff;
    border: 1px solid #3a3a3a;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    min-width: 160px;
    outline: none;
    transition: all 0.2s ease;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.srm-sport-dropdown:hover {
    background: #333333;
    border-color: #4a4a4a;
}

.srm-sport-dropdown:focus,
.srm-sport-dropdown:active {
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
    background: #2a2a2a;
    color: #ffffff;
    outline: none;
}

/* Opciones del dropdown */
.srm-sport-dropdown option {
    background: #2a2a2a;
    color: #ffffff;
    padding: 8px;
}

.srm-sport-dropdown option:hover,
.srm-sport-dropdown option:focus,
.srm-sport-dropdown option:checked,
.srm-sport-dropdown option:active {
    background: #2271b1 !important;
    color: #ffffff !important;
}

/* Results Wrapper */
.srm-results-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    overflow: hidden;
}

.srm-results-carousel {
    flex: 1;
    overflow: hidden;
    position: relative;
}

.srm-results-track {
    display: flex;
    gap: 10px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 2px 0;
}

/* Result Card - Compact Design */
.srm-result-card {
    min-width: 180px;
    max-width: 220px;
    width: 100%;
    background: #ffffff;
    border: 1px solid #cccccc;
    border-radius: 6px;
    padding: 8px 10px;
    transition: all 0.2s ease;
    flex-shrink: 0;
    box-sizing: border-box;
    position: relative;
}

.srm-result-card:hover {
    background: #f9f9f9;
    border-color: #999999;
}

/* Clickable Card con tooltip mejorado */
.srm-result-card.srm-clickable {
    cursor: pointer;
}

.srm-result-card.srm-clickable:hover {
    background: #f0f5fa;
    border-color: #2271b1;
    transform: translateY(-2px);
}

/* Tooltip personalizado para cards clickables */
.srm-result-card.srm-clickable[title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    background: #1a1a1a;
    color: #ffffff;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 11px;
    white-space: nowrap;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    border: 1px solid #2271b1;
    pointer-events: none;
}

/* Flecha del tooltip */
.srm-result-card.srm-clickable[title]:hover::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-2px);
    border: 5px solid transparent;
    border-top-color: #2271b1;
    z-index: 1001;
    pointer-events: none;
}

/* Result Header */
.srm-result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    padding-bottom: 5px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.srm-event-name {
    color: #666666;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.srm-live-badge {
    background: #ff4444;
    color: #ffffff;
    padding: 2px 5px;
    border-radius: 3px;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 0.3px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Match Display */
.srm-match-display {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.srm-team {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    flex: 1;
}

.srm-team-logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
    background: rgba(0, 0, 0, 0.03);
    border-radius: 4px;
    padding: 3px;
}

.srm-team-logo-placeholder {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-weight: 700;
    font-size: 11px;
}

.srm-team-abbr {
    color: #000000;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Score */
.srm-score {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0 5px;
}

.srm-score-value {
    color: #000000;
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
}

.srm-score-separator {
    color: rgba(0, 0, 0, 0.4);
    font-size: 14px;
    font-weight: 500;
}

/* Navigation Buttons - Compact */
.srm-nav-btn {
    background: #3a3a3a;
    border: 1px solid #4a4a4a;
    color: #ffffff;
    width: 28px;
    height: 28px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.srm-nav-btn:hover:not(:disabled) {
    background: #4a4a4a;
    border-color: #2271b1;
}

.srm-nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.srm-nav-btn span {
    line-height: 1;
    user-select: none;
}

/* No Results */
.srm-no-results {
    text-align: center;
    padding: 20px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
}

/* Responsive */
@media (max-width: 1199px) {
    .srm-result-card {
        min-width: 170px;
        max-width: 210px;
    }
}

@media (max-width: 991px) {
    .srm-result-card {
        min-width: 160px;
        max-width: 200px;
    }

    .srm-team-logo,
    .srm-team-logo-placeholder {
        width: 28px;
        height: 28px;
    }

    .srm-score-value {
        font-size: 16px;
    }

    .srm-event-name {
        font-size: 9px;
    }

    .srm-team-abbr {
        font-size: 10px;
    }
}

@media (max-width: 767px) {
    .srm-content-layout {
        flex-direction: column;
        gap: 10px;
    }

    .srm-sport-selector {
        width: 100%;
    }

    .srm-sport-dropdown {
        width: 100%;
    }

    .srm-result-card {
        min-width: 140px;
        max-width: 180px;
        padding: 6px 8px;
    }

    /* Flechas más grandes en tablet */
    .srm-nav-btn {
        width: 36px;
        height: 36px;
        font-size: 22px;
        background: #2a2a2a;
        border: 2px solid #4a4a4a;
    }
}

@media (max-width: 575px) {
    /* CRÍTICO: Permitir overflow visible para botones */
    .srm-sports-results-container {
        padding: 12px 5px !important;
        overflow: visible !important;
    }

    /* Layout vertical: dropdown arriba, carousel abajo */
    .srm-content-layout {
        flex-direction: column !important;
        gap: 12px !important;
        overflow: visible !important;
    }

    /* Dropdown ocupa toda la fila superior */
    .srm-sport-selector {
        width: 100% !important;
        padding: 0 10px !important;
    }

    .srm-sport-dropdown {
        width: 100% !important;
        padding: 10px 15px !important;
        font-size: 14px !important;
    }

    /* Layout móvil: botones SOBRE el carousel */
    .srm-results-wrapper {
        position: relative !important;
        gap: 0 !important;
        padding: 0 !important;
        overflow: visible !important;
        margin: 0 !important;
        width: 100% !important;
    }

    /* Carousel con margen para botones */
    .srm-results-carousel {
        width: 100% !important;
        overflow: hidden !important;
        margin: 0 58px !important;
    }

    /* Cards más compactas */
    .srm-result-card {
        min-width: 140px !important;
        max-width: 160px !important;
        padding: 7px !important;
    }

    /* BOTONES ABSOLUTAMENTE POSICIONADOS - FUERA DEL CAROUSEL */
    .srm-nav-btn {
        position: absolute !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        width: 52px !important;
        height: 52px !important;
        font-size: 32px !important;
        background: #2271b1 !important;
        border: 3px solid #2271b1 !important;
        box-shadow: none !important;
        flex-shrink: 0 !important;
        z-index: 999 !important;
        border-radius: 50% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        cursor: pointer !important;
    }

    .srm-nav-prev {
        left: 0 !important;
    }

    .srm-nav-next {
        right: 0 !important;
    }

    .srm-nav-btn:hover:not(:disabled),
    .srm-nav-btn:active:not(:disabled) {
        background: #1a5a8a !important;
        border-color: #1a5a8a !important;
        transform: translateY(-50%) scale(1.08) !important;
        box-shadow: none !important;
    }

    .srm-nav-btn:disabled {
        background: #4a4a4a !important;
        border-color: #555555 !important;
        opacity: 0.4 !important;
        box-shadow: none !important;
        cursor: not-allowed !important;
    }

    /* Ajustar tamaños internos de las cards */
    .srm-team-logo {
        width: 28px !important;
        height: 28px !important;
    }

    .srm-score-value {
        font-size: 16px !important;
    }

    .srm-event-name {
        font-size: 10px !important;
    }

    .srm-team-name {
        font-size: 10px !important;
    }
}

/* Touch Support */
.srm-results-carousel {
    touch-action: pan-y;
    user-select: none;
}