/* ================================================
   Precision Darts League — Public Styles
   ================================================ */
*, *::before, *::after { box-sizing:border-box; }

/* ---- Base widget ---- */
.pdl-widget { font-family: system-ui, -apple-system, sans-serif; color:#1a1a2e; line-height:1.5; }
.pdl-muted   { color:#6b7280; margin:0; }
.pdl-small   { font-size:.8rem; }
.pdl-error   { color:#dc2626; font-size:.88rem; margin:6px 0 0; }

/* ---- Hero ---- */
.pdl-hero { background:linear-gradient(135deg,#0f0f23 0%,#1a0533 50%,#0a1628 100%); color:#fff; padding:40px 24px; border-radius:16px; margin-bottom:24px; }
.pdl-hero-title { font-size:1.8rem; font-weight:800; text-align:center; margin:0 0 20px; letter-spacing:-.02em; }
.pdl-hero-stats { display:flex; justify-content:center; gap:32px; flex-wrap:wrap; }
.pdl-hero-stat  { text-align:center; }
.pdl-hero-stat .pdl-num { display:block; font-size:2rem; font-weight:700; color:#a78bfa; }
.pdl-hero-stat span:last-child { font-size:.82rem; color:#9ca3af; }

/* ---- Sections ---- */
.pdl-section { margin:28px 0; }
.pdl-section-title { font-size:1.1rem; font-weight:700; text-transform:uppercase; letter-spacing:.06em; color:#374151; margin:0 0 12px; padding-bottom:8px; border-bottom:2px solid #e5e7eb; }

/* ---- Badges ---- */
.pdl-badge { display:inline-block; padding:2px 8px; border-radius:20px; font-size:.75rem; font-weight:600; white-space:nowrap; vertical-align:middle; }
.pdl-badge-blue   { background:#dbeafe; color:#1d4ed8; }
.pdl-badge-amber  { background:#fef3c7; color:#b45309; }
.pdl-badge-green  { background:#d1fae5; color:#065f46; }
.pdl-badge-grey   { background:#f3f4f6; color:#6b7280; }
.pdl-badge-red    { background:#fee2e2; color:#b91c1c; }

/* ---- Match rows ---- */
.pdl-match-list { display:flex; flex-direction:column; gap:8px; }
.pdl-match-row { display:flex; align-items:center; gap:8px; padding:10px 14px; background:#f9fafb; border-radius:10px; border:1px solid #e5e7eb; flex-wrap:wrap; }
.pdl-match-played { background:#f0fdf4; border-color:#bbf7d0; }
.pdl-match-player { flex:1; font-size:.9rem; min-width:80px; }
.pdl-align-right  { text-align:right; }
.pdl-match-score  { font-size:1rem; font-weight:700; min-width:60px; text-align:center; color:#374151; }
.pdl-vs           { color:#9ca3af; font-size:.85rem; }
.pdl-winner       { color:#059669; font-weight:700; }

/* ---- Week blocks ---- */
.pdl-week-block { margin-bottom:20px; }
.pdl-week-header { display:flex; align-items:center; gap:8px; margin-bottom:8px; }
.pdl-week-label  { font-weight:700; font-size:.95rem; color:#374151; }

/* ---- Standings ---- */
.pdl-cat-title { font-weight:700; font-size:1rem; text-transform:uppercase; letter-spacing:.06em; margin:16px 0 8px; }
.pdl-blue  { color:#1d4ed8; }
.pdl-amber { color:#b45309; }
.pdl-groups-grid { display:flex; gap:16px; flex-wrap:wrap; margin-bottom:16px; }
.pdl-group-table { flex:1; min-width:260px; }
.pdl-group-header { background:#1e1e2e; color:#fff; padding:6px 12px; border-radius:8px 8px 0 0; font-weight:700; font-size:.88rem; }
.pdl-table { width:100%; border-collapse:collapse; font-size:.88rem; }
.pdl-table th { padding:6px 10px; background:#f3f4f6; text-align:left; font-weight:600; color:#374151; border-bottom:1px solid #e5e7eb; }
.pdl-table td { padding:6px 10px; border-bottom:1px solid #f3f4f6; }
.pdl-table tr:last-child td { border-bottom:none; }
.pdl-table-sm th, .pdl-table-sm td { padding:4px 8px; }
.pdl-leader td { background:#f0fdf4; font-weight:600; }
.pdl-pos { width:28px; text-align:center; color:#9ca3af; }
.pdl-player-name { font-weight:600; }

/* ---- Tournament cards ---- */
.pdl-tournament-card { border:1px solid #e5e7eb; border-radius:14px; padding:20px; margin-bottom:16px; background:#fff; transition:box-shadow .2s; }
.pdl-tournament-card:hover { box-shadow:0 4px 20px rgba(0,0,0,.08); }
.pdl-tournament-closed { opacity:.7; }
.pdl-tournament-header { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; margin-bottom:12px; flex-wrap:wrap; }
.pdl-tournament-badges { display:flex; gap:6px; flex-wrap:wrap; }
.pdl-tournament-name { font-size:1.1rem; font-weight:700; margin:0 0 2px; }
.pdl-tournament-desc { color:#6b7280; font-size:.88rem; margin:8px 0; }

/* Capacity bar */
.pdl-capacity { display:flex; align-items:center; gap:10px; margin:12px 0; }
.pdl-capacity-bar { flex:1; height:6px; background:#e5e7eb; border-radius:3px; overflow:hidden; }
.pdl-capacity-fill { height:100%; background:#7c3aed; border-radius:3px; transition:width .4s; }
.pdl-capacity-text { font-size:.78rem; color:#6b7280; white-space:nowrap; }
.pdl-capacity-wait { font-size:.78rem; color:#d97706; white-space:nowrap; }

/* Signup list */
.pdl-signup-list { display:flex; flex-wrap:wrap; gap:6px; margin:10px 0; }
.pdl-signup-entry { font-size:.82rem; background:#f3f4f6; padding:3px 10px; border-radius:20px; color:#374151; display:flex; align-items:center; gap:4px; }

/* Action area */
.pdl-tournament-action { margin-top:14px; padding-top:14px; border-top:1px solid #e5e7eb; }
.pdl-action-registered { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.pdl-success-text  { color:#059669; font-weight:600; font-size:.9rem; }
.pdl-warning-text  { color:#d97706; font-weight:600; font-size:.9rem; }

/* Bank details */
.pdl-bank-details { background:#fffbeb; border:1px solid #fde68a; border-radius:10px; padding:16px; margin-top:12px; font-size:.88rem; }
.pdl-bank-details h4 { margin:0 0 10px; font-size:.95rem; color:#92400e; }
.pdl-bank-details p { margin:4px 0; }

/* ---- Login widget ---- */
.pdl-login-widget { }
.pdl-login-box { background:#f9fafb; border:1px solid #e5e7eb; border-radius:12px; padding:20px; }
.pdl-login-box h3 { margin:0 0 8px; font-size:1rem; }
.pdl-form-row { display:flex; gap:8px; flex-wrap:wrap; }
.pdl-logged-in-box { background:#f0fdf4; border-color:#bbf7d0; display:flex; align-items:center; justify-content:space-between; gap:10px; }

/* ---- Buttons ---- */
.pdl-btn { display:inline-flex; align-items:center; gap:6px; padding:8px 16px; border-radius:8px; border:none; cursor:pointer; font-size:.88rem; font-weight:600; transition:all .2s; text-decoration:none; }
.pdl-btn-primary { background:#7c3aed; color:#fff; }
.pdl-btn-primary:hover { background:#6d28d9; }
.pdl-btn-outline { background:transparent; color:#374151; border:1px solid #d1d5db; }
.pdl-btn-outline:hover { background:#f3f4f6; }
.pdl-btn-sm { padding:5px 12px; font-size:.8rem; }
.pdl-btn-pay { background:#059669; color:#fff; }
.pdl-btn-pay:hover { background:#047857; }

/* ---- Input ---- */
.pdl-input { padding:8px 12px; border:1px solid #d1d5db; border-radius:8px; font-size:.9rem; width:100%; flex:1; }
.pdl-input:focus { outline:none; border-color:#7c3aed; box-shadow:0 0 0 3px rgba(124,58,237,.12); }

/* ---- Toast / notification ---- */
.pdl-toast { position:fixed; bottom:20px; right:20px; background:#1e1e2e; color:#fff; padding:12px 20px; border-radius:10px; z-index:99999; font-size:.9rem; max-width:320px; box-shadow:0 8px 24px rgba(0,0,0,.25); animation:pdlFadeIn .3s; }
.pdl-toast.pdl-toast-error { background:#dc2626; }
.pdl-toast.pdl-toast-success { background:#059669; }
@keyframes pdlFadeIn { from { opacity:0; transform:translateY(10px); } to { opacity:1; transform:translateY(0); } }

/* ---- Responsive ---- */
@media (max-width:600px) {
	.pdl-hero-stats { gap:16px; }
	.pdl-match-row { flex-direction:column; align-items:flex-start; gap:4px; }
	.pdl-align-right { text-align:left; }
	.pdl-match-score { text-align:left; }
	.pdl-groups-grid { flex-direction:column; }
	.pdl-group-table { min-width:0; }
}
