/* =========================================================================
   BSB MECCA Prediction League — Phase 1 stylesheet
   ========================================================================= */

.mrpl-wrap {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px 80px;
    font-family: 'DM Sans', -apple-system, system-ui, sans-serif;
    color: #1A1A1A;
}

/* Hero */
.mrpl-hero { padding: 48px 0 24px; text-align: center; border-bottom: 1px solid #E5E1D6; margin-bottom: 32px; }
.mrpl-kicker { font-family: 'Barlow Condensed', sans-serif; font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; color: #C8102E; font-weight: 700; margin-bottom: 10px; }
.mrpl-hero h1 { font-family: 'Playfair Display', Georgia, serif; font-size: clamp(34px, 5vw, 52px); font-weight: 500; letter-spacing: -0.02em; line-height: 1.04; margin: 0 0 14px; color: #1A1A1A; }
.mrpl-lede { max-width: 640px; margin: 0 auto; font-size: 17px; line-height: 1.5; color: #555; }

/* Flash banners */
.mrpl-flash { padding: 14px 18px; border-radius: 0; font-size: 14px; margin: 0 0 24px; font-weight: 500; }
.mrpl-flash-ok { background: #E7F3EC; border-left: 3px solid #1F8A3D; color: #1F5A2D; }
.mrpl-flash-err { background: #FBEBEB; border-left: 3px solid #C62828; color: #8B1A1A; }

/* Cards */
.mrpl-card { background: #FFF; border: 1px solid #E5E1D6; padding: 28px; margin-bottom: 28px; }
.mrpl-card h2 { font-family: 'Playfair Display', Georgia, serif; font-size: 26px; font-weight: 500; margin: 0 0 14px; }
.mrpl-card-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; }
.mrpl-card-head h2 { margin: 0; }
.mrpl-more { color: #C8102E; text-decoration: none; font-weight: 600; font-size: 13px; }
.mrpl-more:hover { text-decoration: underline; }

/* Round card */
.mrpl-round-card { background: #FFF; border: 1px solid #E5E1D6; padding: 28px; margin-bottom: 28px; box-shadow: 0 1px 3px rgba(0,0,0,0.04); }
.mrpl-round-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; flex-wrap: wrap; margin-bottom: 24px; padding-bottom: 18px; border-bottom: 1px dashed #DDD; }
.mrpl-round-head h2 { font-family: 'Playfair Display', Georgia, serif; font-size: 28px; font-weight: 500; margin: 4px 0 0; display: flex; align-items: center; gap: 12px; }
.mrpl-round-kicker { font-family: 'Barlow Condensed', sans-serif; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: #888; font-weight: 700; }
.mrpl-round-num { font-family: 'Barlow Condensed', sans-serif; font-size: 12px; background: #1A1A1A; color: #fff; padding: 2px 10px; letter-spacing: 0.1em; font-weight: 700; }

.mrpl-countdown { text-align: right; font-family: 'Barlow Condensed', sans-serif; }
.mrpl-countdown .mrpl-label { display: block; font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: #888; font-weight: 700; margin-bottom: 4px; }
.mrpl-cd-value { font-size: 26px; font-weight: 700; color: #C8102E; font-variant-numeric: tabular-nums; }
.mrpl-cd-locked { color: #888; }
.mrpl-locked { font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: #888; }

/* Signup form */
.mrpl-signin { text-align: center; padding: 20px 0 10px; }
.mrpl-signin h3 { font-family: 'Playfair Display', Georgia, serif; font-size: 22px; font-weight: 500; margin: 0 0 8px; }
.mrpl-signin p { color: #666; margin: 0 0 20px; }
.mrpl-form { display: flex; gap: 8px; max-width: 440px; margin: 0 auto; }
.mrpl-form input[type=email] { flex: 1; padding: 12px 14px; border: 1px solid #1A1A1A; font-family: inherit; font-size: 15px; border-radius: 0; }
.mrpl-form input[type=email]:focus { outline: 2px solid #C8102E; outline-offset: -1px; }
.mrpl-form button { padding: 12px 24px; background: #1A1A1A; color: #fff; border: none; font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 14px; letter-spacing: 0.12em; text-transform: uppercase; cursor: pointer; transition: background 0.15s; border-radius: 0; }
.mrpl-form button:hover { background: #C8102E; }

/* Picker */
.mrpl-picker { padding: 12px 0; }
.mrpl-picker h3 { font-family: 'Playfair Display', Georgia, serif; font-size: 22px; font-weight: 500; margin: 0 0 6px; }
.mrpl-hint { color: #666; font-size: 13px; margin: 0 0 20px; }

.mrpl-slots { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-bottom: 24px; }
@media (max-width: 640px) { .mrpl-slots { grid-template-columns: repeat(2, 1fr); } }
.mrpl-slot { position: relative; background: #F5F3EE; border: 2px solid #E5E1D6; padding: 14px 10px; text-align: center; min-height: 80px; display: flex; flex-direction: column; justify-content: center; transition: all 0.15s; }
.mrpl-slot-filled { background: #FFF; border-color: #C8102E; }
.mrpl-slot-num { font-family: 'Barlow Condensed', sans-serif; font-size: 10px; color: #888; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 6px; }
.mrpl-slot-value { font-family: 'Playfair Display', Georgia, serif; font-size: 14px; font-weight: 600; color: #1A1A1A; line-height: 1.2; }
.mrpl-slot-filled .mrpl-slot-value { color: #C8102E; }
.mrpl-slot-clear { position: absolute; top: 4px; right: 4px; width: 20px; height: 20px; background: none; border: none; color: #999; font-size: 18px; line-height: 1; cursor: pointer; opacity: 0; transition: opacity 0.15s; }
.mrpl-slot-filled .mrpl-slot-clear { opacity: 1; }
.mrpl-slot-clear:hover { color: #C62828; }
.mrpl-slot-name { display: block; }
.mrpl-slot-nat { font-size: 10px; color: #888; font-family: 'DM Sans', sans-serif; font-weight: 500; letter-spacing: 0.05em; }

/* Bonus pick section */
.mrpl-bonus-section { background: linear-gradient(135deg, #FFF4EC 0%, #FFF 100%); border: 1px solid #C8102E; padding: 16px 18px; margin-bottom: 22px; }
.mrpl-bonus-header { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 12px; }
.mrpl-bonus-badge { background: #C8102E; color: #fff; font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 18px; padding: 6px 12px; letter-spacing: 0.04em; line-height: 1; flex-shrink: 0; }
.mrpl-bonus-header h4 { font-family: 'Playfair Display', Georgia, serif; font-size: 18px; font-weight: 500; margin: 0 0 4px; color: #1A1A1A; }
.mrpl-bonus-header p { font-size: 12px; color: #666; margin: 0; line-height: 1.4; }
.mrpl-bonus-slot { position: relative; background: #FFF; border: 2px dashed #C8102E; padding: 14px 16px; display: flex; align-items: center; gap: 14px; min-height: 56px; transition: all 0.15s; }
.mrpl-bonus-slot.mrpl-slot-filled { border-style: solid; background: #FFF; }
.mrpl-bonus-slot .mrpl-slot-num { font-family: 'Barlow Condensed', sans-serif; font-size: 11px; color: #C8102E; font-weight: 700; letter-spacing: 0.14em; min-width: 80px; margin: 0; }
.mrpl-bonus-slot .mrpl-slot-value { font-family: 'Playfair Display', Georgia, serif; font-size: 15px; font-weight: 600; color: #888; flex: 1; text-align: left; }
.mrpl-bonus-slot.mrpl-slot-filled .mrpl-slot-value { color: #C8102E; }
.mrpl-bonus-slot .mrpl-slot-clear { position: static; width: 24px; height: 24px; opacity: 0; font-size: 20px; }
.mrpl-bonus-slot.mrpl-slot-filled .mrpl-slot-clear { opacity: 1; }

/* Mode toggle between top-5 and bonus */
.mrpl-mode-toggle { display: flex; gap: 4px; margin: 14px 0 10px; border-bottom: 2px solid #E5E1D6; }
.mrpl-mode-btn { background: none; border: none; padding: 10px 16px; font-family: 'Barlow Condensed', sans-serif; font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: #888; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px; transition: all 0.12s; }
.mrpl-mode-btn:hover { color: #1A1A1A; }
.mrpl-mode-btn.mrpl-mode-active { color: #1A1A1A; border-bottom-color: #C8102E; }

/* Bonus-picked rider tile */
.mrpl-rider-bonus { background: #C8102E !important; color: #fff !important; border-color: #C8102E !important; }
.mrpl-rider-bonus .mrpl-rider-num,
.mrpl-rider-bonus .mrpl-rider-nat { color: rgba(255,255,255,0.75) !important; }

.mrpl-search { margin-bottom: 16px; }
.mrpl-search input { width: 100%; padding: 12px 14px; border: 1px solid #CCC; font-family: inherit; font-size: 14px; border-radius: 0; }
.mrpl-search input:focus { outline: 2px solid #C8102E; outline-offset: -1px; border-color: #C8102E; }

.mrpl-rider-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px; margin-bottom: 24px; max-height: 340px; overflow-y: auto; padding: 4px; border: 1px solid #EEE; }
.mrpl-rider { text-align: left; padding: 10px 12px; background: #FAFAF7; border: 1px solid transparent; font-family: 'DM Sans', sans-serif; font-size: 13px; cursor: pointer; transition: all 0.1s; display: flex; align-items: baseline; gap: 8px; border-radius: 0; }
.mrpl-rider:hover { background: #FFF; border-color: #C8102E; }
.mrpl-rider-picked { background: #C8102E !important; color: #fff !important; border-color: #C8102E !important; }
.mrpl-rider-num { font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 13px; color: #888; min-width: 30px; }
.mrpl-rider-picked .mrpl-rider-num { color: rgba(255,255,255,0.7); }
.mrpl-rider-name { flex: 1; font-weight: 600; }
.mrpl-rider-nat { font-size: 10px; color: #999; font-weight: 500; }
.mrpl-rider-picked .mrpl-rider-nat { color: rgba(255,255,255,0.65); }

.mrpl-submit { width: 100%; padding: 16px 24px; background: #1A1A1A; color: #fff; border: none; font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 15px; letter-spacing: 0.14em; text-transform: uppercase; cursor: pointer; transition: background 0.15s; border-radius: 0; }
.mrpl-submit:hover:not(:disabled) { background: #C8102E; }
.mrpl-submit:disabled { background: #CCC; cursor: not-allowed; }

.mrpl-scoring-explainer { margin-top: 16px; padding: 12px; background: #F5F3EE; font-size: 12px; color: #555; line-height: 1.6; }
.mrpl-scoring-explainer b { color: #1A1A1A; }

.mrpl-msg { margin-top: 12px; padding: 8px 12px; font-size: 13px; min-height: 1em; }
.mrpl-msg-ok { background: #E7F3EC; color: #1F5A2D; }
.mrpl-msg-err { background: #FBEBEB; color: #8B1A1A; }

/* Picks readonly */
.mrpl-picks-readonly { list-style: decimal inside; padding: 0; margin: 0 0 8px; font-family: 'Playfair Display', Georgia, serif; font-size: 18px; }
.mrpl-picks-readonly li { padding: 8px 0; border-bottom: 1px dashed #DDD; }

/* Leaderboard */
.mrpl-lb-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.mrpl-lb-table th { text-align: left; padding: 10px 8px; border-bottom: 1px solid #1A1A1A; font-family: 'Barlow Condensed', sans-serif; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: #666; font-weight: 700; }
.mrpl-lb-table td { padding: 10px 8px; border-bottom: 1px dashed #DDD; }
.mrpl-lb-table tr:last-child td { border-bottom: none; }
.mrpl-lb-table .mrpl-rank { width: 40px; font-weight: 700; font-variant-numeric: tabular-nums; color: #888; }
.mrpl-lb-table .mrpl-rank-1 { color: #C8102E; font-size: 16px; }
.mrpl-lb-table .mrpl-rank-2 { color: #777; }
.mrpl-lb-table .mrpl-rank-3 { color: #8B5E34; }
.mrpl-lb-table tr.mrpl-me { background: #FFF4EC; font-weight: 600; }

.mrpl-footer { margin-top: 40px; padding-top: 20px; border-top: 1px solid #E5E1D6; font-size: 13px; color: #666; text-align: center; }
.mrpl-footer a { color: #C8102E; text-decoration: none; }
.mrpl-footer a:hover { text-decoration: underline; }
