/* StatsBet Predictions Styles */

.statsbet-schedule {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.statsbet-day-section {
    margin-bottom: 30px;
}

.statsbet-date-header {
    font-size: 1.4em;
    color: #333;
    border-bottom: 2px solid #007bff;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.statsbet-matches-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.statsbet-match-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.statsbet-match-card-link:hover .statsbet-match-card {
    border-color: #007bff;
    box-shadow: 0 4px 12px rgba(0,123,255,0.2);
    transform: translateY(-2px);
}

.statsbet-match-card {
    position: relative;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 14px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    transition: all 0.2s ease;
    display: grid;
    grid-template-rows: auto auto auto;
    gap: 12px;
}

/* Top row: kickoff + league + badge */
.statsbet-card-top {
    display: flex;
    align-items: center;
    gap: 10px;
}

.statsbet-kickoff-time {
    font-size: 12px;
    font-weight: 700;
    color: #1a1a1a;
    background: #f5f5f5;
    padding: 4px 8px;
    border-radius: 4px;
    flex-shrink: 0;
}

.statsbet-league-header {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    min-width: 0;
}

.statsbet-league-image {
    width: 20px;
    height: 20px;
    object-fit: contain;
    flex-shrink: 0;
}

.statsbet-league-name {
    font-size: 11px;
    color: #6b7280;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Teams row */
.statsbet-teams {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 8px;
}

.statsbet-team {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.statsbet-home-team {
    justify-content: flex-start;
}

.statsbet-away-team {
    justify-content: flex-end;
    flex-direction: row-reverse;
}

.statsbet-team-image {
    width: 32px;
    height: 32px;
    object-fit: contain;
    flex-shrink: 0;
}

.statsbet-team-name {
    font-size: 13px;
    font-weight: 600;
    color: #1a1a1a;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.statsbet-home-team .statsbet-team-name {
    text-align: left;
}

.statsbet-away-team .statsbet-team-name {
    text-align: right;
}

.statsbet-vs {
    font-size: 11px;
    font-weight: 600;
    color: #9ca3af;
    text-transform: uppercase;
    flex-shrink: 0;
}

/* Prediction row */
.statsbet-prediction {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 10px 12px;
}

.statsbet-prediction-label {
    font-size: 13px;
    font-weight: 700;
    color: #007bff;
    margin-bottom: 6px;
    text-align: center;
}

.statsbet-prediction-stats {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 11px;
}

.statsbet-chance {
    color: #28a745;
    font-weight: 500;
}

.statsbet-odds,
.statsbet-value {
    color: #6c757d;
}

.statsbet-value-positive {
    color: #28a745;
    font-weight: 600;
}

/* ==========================================================================
   Featured Card Styles (Value Bets & High Probability)
   Uses modifier classes: --value (orange) and --highprob (green)
   ========================================================================== */

/* Shared badge styles */
.statsbet-featured-badge,
.statsbet-premium-badge,
.statsbet-our-predictions-badge,
.statsbet-high-prob-badge {
    font-size: 9px;
    font-weight: 700;
    color: #fff;
    padding: 3px 8px;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    flex-shrink: 0;
    margin-left: auto;
}

/* Badge color variants */
.statsbet-featured-badge--value,
.statsbet-premium-badge,
.statsbet-our-predictions-badge {
    background: linear-gradient(135deg, #ffc107, #ff9800);
}

.statsbet-featured-badge--highprob,
.statsbet-high-prob-badge {
    background: linear-gradient(135deg, #28a745, #20c997);
}

/* Featured card base styles */
.statsbet-featured-card {
    border-width: 2px;
    border-style: solid;
}

/* Value bets variant (orange theme) */
.statsbet-featured-card--value,
.statsbet-value-card {
    border-color: #ff9800;
    background: linear-gradient(135deg, #fffbf0 0%, #fff 100%);
}

.statsbet-match-card-link:hover .statsbet-featured-card--value,
.statsbet-match-card-link:hover .statsbet-value-card {
    border-color: #ff9800;
    box-shadow: 0 4px 12px rgba(255, 152, 0, 0.3);
}

.statsbet-featured-prediction--value,
.statsbet-value-prediction {
    background: linear-gradient(135deg, #fff8e1 0%, #fff3e0 100%);
}

/* High probability variant (green theme) */
.statsbet-featured-card--highprob,
.statsbet-high-prob-card {
    border-color: #28a745;
    background: linear-gradient(135deg, #f0fff4 0%, #fff 100%);
}

.statsbet-match-card-link:hover .statsbet-featured-card--highprob,
.statsbet-match-card-link:hover .statsbet-high-prob-card {
    border-color: #28a745;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.statsbet-featured-prediction--highprob,
.statsbet-high-prob-info {
    background: linear-gradient(135deg, #e8f5e9 0%, #f1f8e9 100%);
}

/* Section header color variants */
.statsbet-best-predictions .statsbet-date-header,
.statsbet-featured-section--value .statsbet-date-header {
    border-bottom-color: #ff9800;
}

.statsbet-high-probability .statsbet-date-header,
.statsbet-featured-section--highprob .statsbet-date-header {
    border-bottom-color: #28a745;
}

/* Value highlight text */
.statsbet-value-highlight {
    color: #ff9800;
    font-weight: 700;
}

.statsbet-chance-highlight {
    color: #28a745;
    font-weight: 700;
}

/* Blurred prediction for non-logged-in users (card view) */
.statsbet-prediction-blurred-container {
    position: relative;
    text-align: center;
    margin-bottom: 6px;
}

.statsbet-blurred {
    -webkit-filter: blur(5px);
    filter: blur(5px);
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    pointer-events: none;
}

.statsbet-prediction-unlock {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: transform 0.2s, box-shadow 0.2s;
    z-index: 1;
}

.statsbet-prediction-unlock:hover {
    transform: translate(-50%, -50%) scale(1.05);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    color: #fff;
}

.statsbet-no-matches {
    text-align: center;
    padding: 40px;
    color: #666;
    font-size: 1.1em;
}

/* Search Styles */
.statsbet-search-container {
    position: relative;
    width: 100%;
    max-width: 100%;
    margin: 0 0 30px;
    box-sizing: border-box;
}

.statsbet-search-input {
    width: 100%;
    padding: 12px 16px;
    font-size: 1em;
    border: 2px solid #ddd;
    border-radius: 8px;
    outline: none;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

.statsbet-search-input:focus {
    border-color: #007bff;
}

.statsbet-search-input::placeholder {
    color: #999;
}

.statsbet-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    margin-top: 4px;
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

/* Theme override protection - solid background for search results */
.statsbet-search-results {
    background-color: #ffffff !important;
    opacity: 1 !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
}

/* Search result items - solid background for theme compatibility */
.statsbet-search-result {
    background-color: #ffffff !important;
    opacity: 1 !important;
    color: #333 !important;
}

.statsbet-search-result .statsbet-search-team-names,
.statsbet-search-result .statsbet-search-result-teams {
    color: #333 !important;
}

.statsbet-search-result .statsbet-search-league {
    color: #007bff !important;
}

.statsbet-search-result .statsbet-search-date,
.statsbet-search-result .statsbet-search-result-meta {
    color: #666 !important;
}

.statsbet-search-result:hover,
.statsbet-search-result.active {
    background-color: #f5f8ff !important;
}

.statsbet-search-results.visible {
    display: block;
}

.statsbet-search-result {
    display: block;
    padding: 12px 16px;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid #eee;
    transition: background-color 0.15s ease;
}

.statsbet-search-result:last-child {
    border-bottom: none;
}

.statsbet-search-result:hover,
.statsbet-search-result.active {
    background-color: #f5f8ff;
}

.statsbet-search-result-teams {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.statsbet-search-team-img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.statsbet-search-team-names {
    font-weight: 600;
    color: #333;
    flex: 1;
}

.statsbet-search-result-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.85em;
    color: #666;
}

.statsbet-search-league {
    color: #007bff;
}

.statsbet-search-date {
    color: #888;
}

.statsbet-search-loading,
.statsbet-search-no-results,
.statsbet-search-error {
    padding: 16px;
    text-align: center;
    color: #666;
}

.statsbet-search-error {
    color: #dc3545;
}

/* Screen reader only text (accessibility) */
.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Responsive - Tablet */
@media (max-width: 767px) {
    .statsbet-schedule {
        padding: 15px;
    }

    .statsbet-matches-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 15px;
    }

    .statsbet-date-header {
        font-size: 1.2em;
    }
}

/* Responsive - Mobile */
@media (max-width: 479px) {
    .statsbet-schedule {
        padding: 10px;
    }

    .statsbet-matches-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .statsbet-match-card {
        padding: 12px;
    }

    .statsbet-team-image {
        width: 28px;
        height: 28px;
    }

    .statsbet-team-name {
        font-size: 12px;
    }

    .statsbet-prediction-stats {
        gap: 8px;
    }
}
