html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

/* ============================================
   HORSE PICKING INTERFACE STYLES
   ============================================ */

/* Horse Pick Cards */
.horse-pick-card {
    padding: 10px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    background: #fff;
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
}

.horse-pick-card:hover {
    border-color: #0d6efd;
    box-shadow: 0 2px 8px rgba(13, 110, 253, 0.15);
    transform: translateY(-1px);
}

.horse-pick-card.scratched {
    background-color: #fef2f2;
    border: 2px solid #dc2626;
    opacity: 0.7;
    cursor: not-allowed;
    position: relative;
}

.horse-pick-card.scratched:hover {
    transform: none;
    box-shadow: none;
    border-color: #dc2626;
    background-color: #fef2f2;
}

.horse-pick-card.scratched::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 40%, rgba(220, 38, 38, 0.1) 50%, transparent 60%);
    pointer-events: none;
    animation: scratchShimmer 2s infinite;
}

@keyframes scratchShimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* League Selection */
.league-selector {
    transition: all 0.2s ease;
    cursor: pointer;
}

.league-selector:hover {
    background-color: #f8f9fa;
}

.league-selector.active {
    background-color: #0d6efd;
    color: white;
}

.league-selector.active .text-muted,
.league-selector.active .text-success {
    color: rgba(255, 255, 255, 0.8) !important;
}

/* Pick Buttons */
.pick-btn {
    transition: all 0.2s ease;
    font-weight: 600;
    border-width: 2px;
}

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

.pick-btn.btn-success {
    background-color: #198754;
    border-color: #198754;
    color: white;
}

.pick-btn.btn-success:hover {
    background-color: #157347;
    border-color: #157347;
}

/* Pick Type Specific Styles */
.pick-btn[data-pick-type="Win"] {
    border-color: #198754;
    color: #198754;
}

.pick-btn[data-pick-type="Win"]:hover,
.pick-btn[data-pick-type="Win"].active {
    background-color: #198754;
    border-color: #198754;
    color: white;
}

.pick-btn[data-pick-type="Place"] {
    border-color: #0dcaf0;
    color: #0dcaf0;
}

.pick-btn[data-pick-type="Place"]:hover,
.pick-btn[data-pick-type="Place"].active {
    background-color: #0dcaf0;
    border-color: #0dcaf0;
    color: white;
}

.pick-btn[data-pick-type="Show"] {
    border-color: #ffc107;
    color: #ffc107;
}

.pick-btn[data-pick-type="Show"]:hover,
.pick-btn[data-pick-type="Show"].active {
    background-color: #ffc107;
    border-color: #ffc107;
    color: black;
}

/* Racing Cards */
.race-card {
    transition: all 0.2s ease;
}

.race-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Loading States */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1055;
}

.toast {
    min-width: 300px;
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.toast.success {
    border-left: 4px solid #198754;
}

.toast.error {
    border-left: 4px solid #dc3545;
}

.toast.warning {
    border-left: 4px solid #ffc107;
}

/* Time Display */
.time-until-race {
    font-family: 'Courier New', monospace;
    font-weight: bold;
    color: #fd7e14;
}

/* Responsive Improvements */
@media (max-width: 768px) {
    .horse-pick-card {
        padding: 8px;
        margin-bottom: 8px;
    }
    
    .pick-btn {
        font-size: 0.8rem;
        padding: 0.25rem 0.5rem;
    }
    
    .league-selector {
        font-size: 0.9rem;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.3s ease-out;
}

@keyframes slideIn {
    from { transform: translateX(-20px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.slide-in {
    animation: slideIn 0.3s ease-out;
}

/* Status Indicators */
.status-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
}

.status-indicator.live {
    background-color: #dc3545;
    animation: pulse 1.5s infinite;
}

.status-indicator.scheduled {
    background-color: #198754;
}

.status-indicator.completed {
    background-color: #6c757d;
}

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

/* Pick Summary */
.pick-summary {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 15px;
}

.pick-count-badge {
    background: linear-gradient(135deg, #0d6efd 0%, #0b5ed7 100%);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* ============================================
   COLLAPSIBLE RACE CARDS
   ============================================ */

/* Race Card Container */
.race-card {
    border: 1px solid #e9ecef;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    overflow: hidden;
}

.race-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

/* Race Header */
.race-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid #e9ecef;
    transition: all 0.3s ease;
    user-select: none;
    padding: 16px 20px !important; /* More compact padding */
}

.race-header:hover {
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
}

/* Picked Race Header - Darker Blue/Green Theme */
.race-header.race-picked {
    background: linear-gradient(135deg, #4a90d9 0%, #357abd 100%);
    color: white;
    border-bottom-color: #2e6da4;
}

.race-header.race-picked:hover {
    background: linear-gradient(135deg, #357abd 0%, #2e6da4 100%);
}

.race-header.race-picked .text-muted {
    color: rgba(255, 255, 255, 0.8) !important;
}

.race-header.race-picked .badge {
    background-color: rgba(255, 255, 255, 0.2) !important;
    color: white !important;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Collapse Indicator */
.collapse-indicator {
    transition: transform 0.3s ease;
    font-size: 1.1rem; /* Slightly smaller */
}

.race-header.race-picked .collapse-indicator {
    color: rgba(255, 255, 255, 0.9);
}

/* Race Content */
.race-content {
    transition: all 0.3s ease;
}

.race-content.collapsing {
    transition: height 0.3s ease;
}

/* Race Horses Container */
.race-horses {
    background: #fff;
}

/* Legacy Pick Summary Styles - Now using pick-bubble instead */

/* Action Text Styling */
.race-action-text {
    font-size: 0.8rem;
    color: #6c757d;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
    background: none;
    padding: 0;
    margin: 0;
}

.race-action-text:hover {
    color: #495057;
    text-decoration: underline;
}

.race-header.race-picked .race-action-text {
    color: rgba(255, 255, 255, 0.8);
}

.race-header.race-picked .race-action-text:hover {
    color: white;
}

/* Pick Bubble - Replaces Action Text When Pick Made */
.pick-bubble {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px; /* More rounded for bubble effect */
    padding: 6px 12px;
    display: inline-flex;
    align-items: center;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    color: white;
}

.pick-bubble:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.pick-bubble strong {
    font-weight: 600;
}

.pick-bubble small {
    color: rgba(255, 255, 255, 0.9);
}

.pick-bubble .bi-check-circle-fill {
    color: #28a745;
    filter: drop-shadow(0 0 2px rgba(0,0,0,0.3));
}

/* Action Container */
.race-action-container {
    display: flex;
    align-items: center;
    min-height: 32px; /* Consistent height for smooth transitions */
}

/* Countdown Text */
.race-countdown {
    font-size: 0.8rem;
    color: #dc3545;
    font-weight: 500;
}

.race-header.race-picked .race-countdown {
    color: rgba(255, 255, 255, 0.9);
}

/* Race Info Title Sizing */
.race-info h5 {
    color: #495057;
    font-weight: 600;
    margin-bottom: 2px; /* Tighter spacing */
    font-size: 1.1rem; /* Slightly smaller for sleeker look */
}

.race-header.race-picked .race-info h5 {
    color: white;
}

/* Status Badges in Header - Removed or simplified */
.race-header .badge {
    font-size: 0.75rem;
    padding: 3px 6px;
}

/* Enhanced Horse Pick Cards for Expanded State */
.race-content .horse-pick-card {
    margin-bottom: 8px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    background: #fff;
    transition: all 0.2s ease;
}

.race-content .horse-pick-card:last-child {
    margin-bottom: 0;
}

.race-content .horse-pick-card:hover {
    border-color: #0d6efd;
    box-shadow: 0 2px 8px rgba(13, 110, 253, 0.15);
    transform: translateY(-1px);
}

/* Race Info Styling */
.race-info h5 {
    color: #495057;
    font-weight: 600;
    margin-bottom: 4px;
}

.race-header.race-picked .race-info h5 {
    color: white;
}

/* Responsive Adjustments for Race Cards */
@media (max-width: 767.98px) {
    .race-card {
        border-radius: 8px;
        margin-bottom: 1rem;
    }
    
    .race-header {
        padding: 12px 16px !important; /* Compact mobile padding */
    }
    
    .race-horses {
        padding: 12px !important;
        padding-top: 0 !important;
    }
    

    
    .race-info h5 {
        font-size: 1rem; /* Smaller on mobile */
    }
    
    .race-action-text {
        font-size: 0.75rem;
    }
    
    .race-countdown {
        font-size: 0.75rem;
    }
    
    .race-action-container {
        min-height: 28px; /* Smaller on mobile */
    }
}

/* Smooth Transitions for All Interactive Elements */
.race-card * {
    transition: all 0.2s ease;
}

/* Override Bootstrap collapse transition for smoother animation */
.race-content.collapse:not(.show) {
    display: none;
}

.race-content.collapsing {
    height: auto;
    overflow: hidden;
    transition: all 0.3s ease;
}

/* Enhance contrast for picked race content */
.race-header.race-picked + .race-content {
    border-top: 2px solid #4a90d9;
}

/* ============================================
   HIDE EXTERNAL AUTH SECTIONS (PRODUCTION) - AGGRESSIVE VERSION
   ============================================ */

/* Target any text content mentioning external services */
/* Note: :contains() is not standard CSS - specific element targeting is preferred */

/* VERY SPECIFIC external auth hiding - targets only actual auth elements */
form[action*="ExternalLogin"],
section[aria-labelledby*="external-login"],
#external-account,
.external-login-section,
.external-login-form,
h4:contains("Use another service"),
div[class*="external-provider"] {
    display: none !important;
}

/* ============================================
   EMAIL SERVICE CONFIGURATION (TODO)
   ============================================ */

/* Future: Email configuration for password reset */
/* Add email service configuration in Program.cs */