/*
 * Boxing Result Widget - Dark Gold Theme
 * Mobile-first, accessible
 * @package BoxingOdds
 * @version 1.1.1 (dark-gold)
 */

:root{
  /* Dark - Gold theme */
  --bg: #0b0b0b;              /* main background */
  --surface: #0f0f0f;         /* card / surface */
  --card-border: #1f1f1f;
  --muted: #bfb69a;           /* muted text (warm) */
  --gold: #d4af37;            /* primary gold */
  --gold-dark: #a67c00;       /* darker gold */
  --radius: 10px;
  --gap: 12px;
  --pad: 12px;
  --shadow: 0 6px 20px rgba(0,0,0,0.6);
  --success: #00b900;

  /* keep explicit red/blue for fighter corners */
  --red: #dc2626;
  --blue: #2563eb;
}

/* Global base */
*{box-sizing:border-box}
html{font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;}

/* Container */
.boxing-result-widget-container {
    background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(0,0,0,0.0)), var(--bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: clamp(12px, 2.5vw, 24px);
    color: #f7f3e8; /* warm off-white for readability */
    border: 1px solid rgba(255,255,255,0.02);
}

/* Search Section */
.boxing-result-search { margin-bottom: var(--gap); }

.search-tabs{
    display:flex;
    gap:8px;
    flex-wrap:wrap;
    margin-bottom:8px;
    border-bottom:2px solid rgba(255,255,255,0.03);
}

.tab-btn{
    flex:0 1 auto;
    padding:8px 12px;
    background:transparent;
    border:none;
    border-bottom:3px solid transparent;
    color:var(--muted);
    font-size:clamp(13px,1.8vw,15px);
    font-weight:600;
    cursor:pointer;
    transition:all .18s ease;
    letter-spacing:.2px;
}
.tab-btn:hover{ color:var(--gold); background: rgba(212,175,55,0.04) }
.tab-btn.active{ color:var(--gold); border-bottom-color:var(--gold); background: rgba(212,175,55,0.06) }

.search-inputs{ display:flex; gap:8px; flex-wrap:wrap }
.boxing-result-date-picker{
    flex:1 1 200px;
    padding:10px 12px;
    border:1px solid rgba(255,255,255,0.04);
    border-radius:6px;
    font-size:14px;
    background: rgba(255,255,255,0.02);
    color: #f7f3e8;
}
.boxing-result-date-picker:focus{
    outline:none;
    border-color:var(--gold);
    box-shadow:0 0 0 4px rgba(212,175,55,0.06);
}

.btn-search{
    padding:10px 16px;
    background: linear-gradient(180deg, var(--gold), var(--gold-dark));
    color:#0b0b0b;
    border:none;
    border-radius:6px;
    font-weight:700;
    white-space:nowrap;
    box-shadow: 0 4px 12px rgba(166,124,0,0.12);
}
.btn-search:hover{ background: linear-gradient(180deg, var(--gold-dark), #7f5d00) }

/* Loading + Error + No results */
.loading-spinner, .boxing-result-error, .no-results{ text-align:center; padding:20px; border-radius:6px }
.spinner{ width:36px; height:36px; border:4px solid rgba(255,255,255,0.06); border-top-color:var(--gold); border-radius:50%; animation:spin 1s linear infinite; margin:0 auto 10px }
@keyframes spin{ to{ transform:rotate(360deg) } }

.boxing-result-error{ background: rgba(220,38,38,0.06); border:1px solid rgba(220,38,38,0.12) }
.error-message{ color:var(--red); margin-bottom:10px }
.btn-retry{ padding:8px 16px; background:var(--red); color:#fff; border-radius:6px }

.no-results{ background: rgba(255,255,255,0.01); border:1px dashed rgba(255,255,255,0.03); color:var(--muted) }

/* Date Picker wrapper */
.date-picker-wrapper {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}
.date-picker-wrapper label {
    margin-right: 10px;
    color: var(--muted);
    font-weight:700;
    font-size:13px;
}

input#boxing-date-picker

 {
    color: black;
    font-weight: 600;
}

/* Results List */
.boxing-results-list{ display:flex; flex-direction:column; gap:var(--gap) }

/* Result Card */
.result-card{
    background: linear-gradient(180deg, rgba(255,255,255,0.01), rgba(255,255,255,0.015));
    border:1px solid var(--card-border);
    border-radius:8px;
    padding:12px;
    transition:box-shadow .18s ease, border-color .18s ease, transform .12s ease;
    overflow:hidden;
}
.result-card:hover{ box-shadow:0 10px 30px rgba(0,0,0,0.7); border-color: rgba(212,175,55,0.22) }

/* Header */
.result-header{
    display:flex; justify-content:space-between; align-items:center; gap:8px; margin-bottom:12px; padding-bottom:8px; border-bottom:1px solid rgba(255,255,255,0.02);
}
.stadium{ font-size:13px; color:var(--muted); font-weight:700 }
.fight-number{ font-size:12px; color:#c9b78a; background:rgba(255,255,255,0.02); padding:6px 10px; border-radius:999px; border:1px solid rgba(255,255,255,0.02) }

/* Fighters - responsive */
.result-fighters{
    display:flex; gap:12px; align-items:center; flex-wrap:wrap;
}

.fighter{
    display:flex; flex:1 1 200px; min-width:0; align-items:center; gap:12px; padding:12px; border-radius:8px;
    background: linear-gradient(180deg, rgba(255,255,255,0.01), rgba(0,0,0,0.02));
    position:relative;
    border:1px solid rgba(255,255,255,0.02);
}

.fighter.red{ border-left:4px solid var(--red) }
.fighter.blue{ border-left:4px solid var(--blue) }
.fighter.winner{ background: linear-gradient(135deg, rgba(212,175,55,0.14) 0%, rgba(212,175,55,0.08) 100%); box-shadow:0 6px 20px rgba(166,124,0,0.12) }

.corner-label{ font-size:11px; font-weight:800; text-transform:uppercase; letter-spacing:.4px }
.fighter.red .corner-label{ color:var(--red) }
.fighter.blue .corner-label{ color:var(--blue) }

.fighter-name{ font-size:clamp(14px,2.2vw,16px); font-weight:800; color:#fff; overflow:hidden; text-overflow:ellipsis; white-space:nowrap }
.winner-badge{ display:inline-block; background:var(--success); color:#07120b; font-size:11px; font-weight:800; padding:4px 8px; border-radius:999px; text-transform:uppercase }

.score-red, .score-blue{
    background:#000; color:#f3e9d2; padding:6px 10px; border-radius:999px; font-weight:800;
    box-shadow: inset 0 -2px 0 rgba(255,255,255,0.02);
}

.vs-divider{ display:flex; align-items:center; justify-content:center; font-size:14px; font-weight:700; color:#c9b78a; background:rgba(255,255,255,0.02); padding:8px 10px; border-radius:6px; flex:0 0 56px }

/* Details */
.result-details{
    display:grid; grid-template-columns:repeat(auto-fit, minmax(120px,1fr)); gap:10px; background:transparent; padding:10px; border-radius:6px; margin-top:12px
}
.detail-item{ display:flex; flex-direction:column; gap:4px; align-items:center }
.detail-item .label{ font-size:11px; color:var(--muted); font-weight:700; text-transform:uppercase }
.detail-item .value{ font-size:14px; color:#f7f3e8; font-weight:700 }

/* Results Info */
.results-info{ text-align:center; margin-top:12px; padding-top:12px; border-top:1px solid rgba(255,255,255,0.02) }
.results-info p{ margin:0; font-size:13px; color:var(--muted) }

/* Category */
.category-section{ margin-bottom:8px }
.category-header{
    display:flex; justify-content:space-between; align-items:center; padding:10px;
    background: linear-gradient(135deg, #3a2b0b 0%, #2b1f07 35%, rgba(212,175,55,0.12) 100%);
    border-radius:8px;
    border:1px solid rgba(212,175,55,0.06);
}
.category-title{ margin:0; color:var(--gold); font-size:16px; font-weight:800 }
.category-count{ background:rgba(255,255,255,0.03); padding:4px 10px; border-radius:999px; color:#f7f3e8; font-weight:700 }
.category-matches{ display:grid; gap:12px }
.category-matches .result-card{ margin-bottom:0 }

/* Small screens adjustments */
@media (max-width:767px){
    .result-header{ display:block }
    h3.category-title { font-size: 14px; }
    .result-fighters { flex-direction: column; align-items: stretch; gap: 8px; }
    .fighter { width: 100%; flex: 1 1 20px; padding: 8px; }
    .vs-divider { display: none; }
    .result-card { padding: 8px; }
    span.category-count { display: none; }
    .score-red, .score-blue {
        background: #000;
        color: #f3e9d2;
        padding: 4px 8px;
        border-radius: 6px;
        font-weight: 700;
        font-size: 13px;
    }
}

/* Animation & accessibility */
.result-card{ animation:fadeInUp .42s ease forwards; opacity:0 }
.result-card:nth-child(1){ animation-delay:.06s }
.result-card:nth-child(2){ animation-delay:.12s }
.result-card:nth-child(3){ animation-delay:.18s }
@keyframes fadeInUp{ from{ opacity:0; transform:translateY(10px) } to{ opacity:1; transform:none } }

@media (prefers-reduced-motion:reduce){ .spinner, .result-card{ animation:none } }

/* Light mode fallback (if needed) */
@media (prefers-color-scheme: light){
    :root{
        --bg: #f8f5ef;
        --surface: #fff;
        --card-border: #e6dfc8;
        --muted: #6b6050;
    }
    .boxing-result-widget-container{ color:#111827 }
    .fighter-name{ color:#111827 }
    .detail-item .value{ color:#111827 }
}

/* Small tweaks */
.result-header .fight-number{ font-size:13px }

/* End of file */
