/* Styles for templates/matchup/view_matchups.html */

/* UNUSED_SELECTOR_REMOVED 
  .custom-select {
      width: auto;
  }
*/

/* UNUSED_SELECTOR_REMOVED 
  .toggle-container.theme-aware {
      display: flex;
      align-items: center;
      gap: 0.5rem;
  }
*/

/* Game Information Row - Weather and Betting */
.game-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
    gap: 1rem;
}

.weather-info, .betting-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.weather-icon, .betting-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    color: var(--text-muted);
}

.weather-icon i, .betting-icon i {
    font-size: 16px;
}

.weather-details, .betting-details {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.temperature {
    color: var(--text-primary);
    font-weight: 600;
}

.wind {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.spread {
    color: var(--accent-primary);
    font-weight: 600;
}

.total {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Weather condition specific colors */
.weather-info .fa-sun {
    color: #f59e0b;
}

.weather-info .fa-cloud {
    color: #6b7280;
}

.weather-info .fa-cloud-rain {
    color: #3b82f6;
}

.weather-info .fa-snowflake {
    color: #e5e7eb;
}

.weather-info .fa-building {
    color: var(--text-muted);
}

/* Betting icon color */
.betting-info .fa-coins {
    color: #10b981;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .game-info-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .weather-info, .betting-info {
        font-size: 0.8rem;
    }
    
    .weather-details, .betting-details {
        gap: 0.25rem;
    }
}

.toggle-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background-color: var(--bg-card);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.toggle-container:hover {
    border-color: var(--accent-primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.toggle-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 500;
    transition: color 0.3s ease;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 22px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

/* UNUSED_SELECTOR_REMOVED 
  .toggle-switch input {
      opacity: 0;
      width: 0;
      height: 0;
  }
*/

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--bg-secondary);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 22px;
    border: 1px solid var(--border-color);
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 2px;
    bottom: 1px;
    background-color: white;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* UNUSED_SELECTOR_REMOVED 
  .toggle-slider:before {
      position: absolute;
      content: "";
      height: 16px;
      width: 16px;
      left: 2px;
      bottom: 2px;
      background-color: var(--text-primary);
      transition: .4s;
      border-radius: 50%;
  }
*/

input:checked + .toggle-slider {
    background-color: var(--accent-primary);
    border-color: var(--accent-primary);
}

input:checked + .toggle-slider:before {
    transform: translateX(22px);
    background-color: white;
}

input:focus + .toggle-slider {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.toggle-container:has(input:checked) .toggle-label:last-child {
    color: var(--accent-primary);
    font-weight: 600;
}

.toggle-container:has(input:not(:checked)) .toggle-label:first-child {
    color: var(--text-primary);
    font-weight: 600;
}

/* UNUSED_SELECTOR_REMOVED 
  input:checked + .toggle-slider:before {
      transform: translateX(20px);
      background-color: var(--button-text);
  }
*/

/* Matchup grid - extends global card-grid class */
.matchup-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

/* Form control enhancements */
#yearSelect, #weekSelect {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    background-color: var(--bg-card);
    color: var(--text-primary);
    font-size: 0.875rem;
    transition: all 0.3s ease;
    min-width: 120px;
}

#yearSelect:hover, #weekSelect:hover {
    border-color: var(--accent-primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

#yearSelect:focus, #weekSelect:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

/* Card animation on load - uses global fadeInUp animation */
.matchup-card-container {
    animation: fadeInUp 0.6s ease-out;
    animation-fill-mode: both;
}

.matchup-card-container:nth-child(1) { animation-delay: 0.1s; }
.matchup-card-container:nth-child(2) { animation-delay: 0.2s; }
.matchup-card-container:nth-child(3) { animation-delay: 0.3s; }
.matchup-card-container:nth-child(4) { animation-delay: 0.4s; }
.matchup-card-container:nth-child(5) { animation-delay: 0.5s; }
.matchup-card-container:nth-child(6) { animation-delay: 0.6s; }
.matchup-card-container:nth-child(n+7) { animation-delay: 0.7s; }

/* Responsive enhancements */
@media (max-width: 768px) {
    .matchup-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .matchup-card-selectable {
        min-height: 180px;
        padding: 1.25rem;
    }
    
    .toggle-container {
        padding: 0.4rem 0.8rem;
        gap: 0.5rem;
    }
    
    .toggle-label {
        font-size: 0.8rem;
    }
    
    .toggle-switch {
        width: 40px;
        height: 20px;
    }
    
    .toggle-slider:before {
        height: 16px;
        width: 16px;
    }
    
    input:checked + .toggle-slider:before {
        transform: translateX(20px);
    }
    
    /* Team name responsive override */
    .matchup-teams .team-name {
        font-size: 1rem;
    }
    
    .matchup-teams .team {
        padding: 0 0.125rem;
    }
}

/* Additional responsive adjustments for very small screens */
@media (max-width: 480px) {
    .matchup-grid {
        grid-template-columns: 1fr;
    }
    
    .matchup-teams .team-name {
        font-size: 0.95rem;
        line-height: 1.25;
    }
    
    .matchup-card-selectable {
        min-height: 160px;
        padding: 1rem;
    }
    
    .matchup-teams {
        gap: 1rem;
    }
}

.matchup-card-container {
    position: relative;
}

/* Matchup card specific styles - extends global card styles */
.matchup-card-selectable {
    text-align: center;
    cursor: pointer;
    height: 100%;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 1.5rem;
}

.matchup-card-selectable::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary, var(--accent-primary)));
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 0;
}

.matchup-card-selectable:hover::before {
    opacity: 0.03;
}

/* Override global hover for stronger effect on matchup cards */
.matchup-card-selectable:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
    border-color: var(--accent-primary);
}

.matchup-card-selectable.selected {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border-color: var(--accent-primary);
    background-color: var(--accent-primary-transparent, rgba(59, 130, 246, 0.05));
}

.matchup-card-selectable.loading {
    pointer-events: none;
    opacity: 0.7;
}

.matchup-card-selectable > * {
    position: relative;
    z-index: 1;
}

/* Matchup teams layout - extends global team-matchup */
.matchup-teams {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1rem;
    width: 100%;
}

.matchup-teams .team {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    min-width: 0;
    padding: 0 0.25rem;
}

/* Team logo styles now handled by global.css */

/* Team name matchup-specific override for larger text */
.matchup-teams .team-name {
    font-size: 1.1rem;
    font-weight: bold;
}

/* Simple VS text styling */
.vs-text {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 1.1rem;
    text-transform: lowercase;
    opacity: 0.7;
}

.game-notes {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 1rem;
}

/* Loading indicator - extends global loading-container */
.loading-indicator {
    /* Uses global loading-container styles */
}

.loading-indicator .spinner {
    /* Uses global loading-spinner styles */
    margin-bottom: 1rem;
}

.info-message, .error-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    min-height: 200px;
    text-align: center;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-card);
}

.info-message {
    color: var(--text-muted);
}

.error-message {
    color: var(--status-error);
    border-color: var(--status-error);
}

/* Loading container styles now in global.css */

/* Message container styles now in global.css */

/* Small loading spinner override */
.loading-spinner.small {
    width: 20px;
    height: 20px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
}
