/*
Theme Name: Pick Top 25
Description: College Football picks theme
Version: 1.3.0
Author: rayflores
*/

/* Theme overrides and layout styles */

/* Mobile viewport height fix for dynamic browser chrome */
html {
	height: 100%;
	min-height: 100dvh; /* Dynamic viewport height for mobile */
}

/* Base body spacing and font (moved from header). */
body {
	font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial;
	margin: 20px;
	background-color: rgb(0, 2, 29) !important;
	min-height: 100dvh; /* Ensure body fills dynamic viewport */
	position: relative;
}

/* Override Bootstrap's bg-dark class to use our custom color */
.bg-dark {
	background-color: rgb(0, 2, 29) !important;
}

/* Navbar tweaks */
.navbar-brand {
	font-weight: 600;
}

/* Menu spacing */
.navbar-nav .nav-item {
	margin-right: 0.5rem;
}

/* Game list and pick items */
.cp-game-list {
	list-style: none;
	padding: 0;
}
.cp-game-item {
	margin: 12px 0;
	padding: 10px;
	border: 1px solid #eee;
	border-radius: 6px;
	background: #fff;
}

.cp-pick-form {
	margin-top: 8px;
}

/* Profile dropdown name styling */
.cp-profile .me-2 {
	font-weight: 500;
}

/* Enhanced Mobile Bottom Navigation with 44px Touch Targets */
.cp-bottom-navbar {
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	z-index: 1060;
	background: rgb(0, 2, 29); /* Match site background */
	backdrop-filter: blur(10px);
	border-top: 1px solid rgba(255, 255, 255, 0.1);
	box-shadow: 0 -2px 20px rgba(0, 0, 0, 0.5);
	padding: 0;
	/* Safe area for iPhone notch/home indicator */
	padding-bottom: env(safe-area-inset-bottom, 0px);
	/* Prevent gap on mobile Chrome during scroll */
	transform: translateZ(0);
	-webkit-transform: translateZ(0);
}

.cp-bottom-nav {
	display: flex;
	list-style: none;
	margin: 0;
	padding: 0;
	justify-content: space-around;
	align-items: stretch;
	width: 100%;
}

.cp-bottom-nav .nav-item {
	flex: 1;
	display: flex;
}

.cp-bottom-nav .nav-link {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 2px;
	min-height: 60px; /* Generous touch target */
	padding: 8px 4px;
	color: #8b92a0;
	text-decoration: none;
	transition: all 0.2s ease;
	border: none;
	background: transparent;
	position: relative;
	/* Minimum 44px touch target per Apple HIG */
	min-width: 44px;
}

.cp-bottom-nav .nav-link i {
	font-size: 22px;
	transition: transform 0.2s ease;
}

.cp-bottom-nav .nav-link span {
	font-size: 11px;
	font-weight: 500;
	letter-spacing: 0.01em;
}

/* Active state */
.cp-bottom-nav .nav-link.active {
	color: #0d6efd;
}

.cp-bottom-nav .nav-link.active::before {
	content: '';
	position: absolute;
	top: 0;
	left: 50%;
	transform: translateX(-50%);
	width: 32px;
	height: 3px;
	background: #0d6efd;
	border-radius: 0 0 3px 3px;
}

/* Hover/Tap effects */
.cp-bottom-nav .nav-link:hover,
.cp-bottom-nav .nav-link:focus {
	color: #ffffff;
	background: rgba(255, 255, 255, 0.05);
}

.cp-bottom-nav .nav-link:active {
	transform: scale(0.96);
	background: rgba(255, 255, 255, 0.08);
}

.cp-bottom-nav .nav-link:active i {
	transform: scale(0.92);
}

/* Focus visible for keyboard navigation */
.cp-bottom-nav .nav-link:focus-visible {
	outline: 2px solid #0d6efd;
	outline-offset: -2px;
}

/* Unread message badge */
.cp-unread-badge {
	position: absolute;
	top: -6px;
	right: -10px;
	background: #dc3545;
	color: white;
	border-radius: 10px;
	padding: 2px 5px;
	font-size: 0.65rem;
	font-weight: 700;
	line-height: 1;
	min-width: 18px;
	text-align: center;
	border: 2px solid rgb(0, 2, 29);
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Make sure page content is not obscured by the fixed bottom nav on small screens */
@media (max-width: 991px) {
	.main-container {
		padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 64px); /* leave room for bottom nav */
	}
}

/* Dark card UI for matchups and week tabs */
.cp-weeks { margin-bottom: 1rem; }
.cp-week-tabs { display:flex; gap:0.5rem; margin-bottom:1rem; }
.cp-week-tab {
	background: rgba(10, 20, 50, 0.5);
	color: #bfc3c6;
	padding: 0.6rem 0.9rem;
	border-radius: 8px;
	border: 1px solid rgba(255,255,255,0.06);
	cursor: pointer;
}
.cp-week-tab.active {
	background: rgba(0, 20, 60, 0.8);
	color: #fff;
	box-shadow: 0 4px 12px rgba(0,10,30,0.8);
	border-color: rgba(0,123,255,0.6);
}

.cp-week-panel { display:none; }
.cp-week-panel.active { display:block; }

.cp-matchup-grid { display:flex; gap:1rem; flex-wrap:wrap; }
.cp-matchup-card {
	background: linear-gradient(180deg, rgba(5, 20, 50, 0.6) 0%, rgba(0, 15, 40, 0.4) 100%);
	border: 1px solid rgba(255,255,255,0.06);
	border-radius: 12px;
	padding: 0.5rem;
	width:100%;
	max-width: 540px;
}
.cp-matchup-header { text-align:center; color:#9aa0a6; font-size:0.8rem; margin-bottom:0.5rem; }
.cp-matchup-body { display:flex; gap:0.5rem; }
.cp-matchup-team {
	flex:1;
	min-height:92px;
	border-radius:10px;
	background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
	display:flex;
	align-items:center;
	justify-content:center;
	color:#e6e6e6;
	cursor:pointer;
	transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
	position:relative;
	overflow:hidden;
}
.cp-matchup-team:hover { transform: translateY(-4px); box-shadow: 0 10px 20px rgba(2,6,23,0.6); }
.cp-matchup-team.selected { outline: 2px solid rgba(0,123,255,0.9); box-shadow: 0 14px 30px rgba(2,6,23,0.7); }
.cp-matchup-team .team-label { font-weight:700; color:#fff; text-align:center; }
.cp-matchup-team .team-sub { color:#b7bdc0; font-size:0.85rem; margin-top:6px; }

.cp-matchup-footer { display:flex; justify-content:space-between; color:#9aa0a6; font-size:0.8rem; margin-top:0.5rem; }

/* Archive winner highlight */
.cp-winner { box-shadow: inset 0 -48px 48px rgba(0,0,0,0.35); border-color: rgba(0,200,120,0.12); }
.cp-winner .team-label { color:#dfffe6; }

/* User selection states */
.cp-matchup-team.cp-selected { box-shadow: 0 10px 24px rgba(0,0,0,0.55); }
.cp-matchup-team.cp-selected-correct { border: 2px solid rgba(102, 255, 179, 0.9); box-shadow: 0 10px 30px rgba(20,120,60,0.18); }
.cp-matchup-team.cp-selected-correct .team-label { color: #eafff0; }
.cp-matchup-team.cp-selected-incorrect { border: 2px solid rgba(180, 40, 40, 0.95); box-shadow: 0 10px 30px rgba(120,20,20,0.18); }
.cp-matchup-team.cp-selected-incorrect .team-label { color: #ffdede; }


/* Submit bar that sits above bottom nav on mobile */
.cp-submit-bar {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 1070; /* above the bottom nav which is 1060 */
	background: #021029; /* solid, no transparency */
	color: #ffffff;
	padding: 1rem;
	box-shadow: 0 -6px 24px rgba(0,5,20,0.8);
}
.cp-submit-bar .btn { border-radius: 0px; padding: 0.5rem 1.2rem; }
.cp-submit-bar .cp-progress { height:25px; background: rgba(255,255,255,0.06); border-radius:0px; }
.cp-submit-bar .cp-progress .progress-bar { background: linear-gradient(90deg,#020e56,#021d89); }

.cp-submit-bar, .cp-submit-bar * { color: #ffffff !important; }
/* Smooth progress animation */
.cp-submit-bar .cp-progress .progress-bar { transition: width 420ms cubic-bezier(.2,.9,.2,1); }

@media (max-width: 991px) {
	/* Lift submit bar above the mobile bottom nav if present */
	.cp-submit-bar { bottom: calc(env(safe-area-inset-bottom, 0px)); }
	/* Increase main content bottom padding to clear submit bar and bottom nav */
	.main-container { padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 160px); }
}

@media (min-width: 992px) {
	/* Desktop: keep the submit bar fixed near the bottom but with smaller offset */
	.cp-submit-bar { bottom: 0px; border-radius: 0; margin: 0; }
}

/* Leaderboard table styling */
.cp-leaderboard-wrap { overflow-x: auto; margin-top: 0.5rem; }
.cp-leaderboard-table { width: 100%; border-collapse: collapse; font-size: 0.95rem; color:#e6e6e6; }
.cp-leaderboard-table thead th { background: rgba(0, 20, 50, 0.6); color: #cfd4d6; padding: 10px 12px; text-align: left; font-weight:700; border-bottom: 1px solid rgba(255,255,255,0.08); }
.cp-leaderboard-table tbody td { padding: 10px 12px; border-bottom: 1px solid rgba(255,255,255,0.04); }
.cp-leaderboard-table tr { background: rgba(5, 15, 40, 0.4); }
.cp-leaderboard-table tr:nth-child(even) { background: rgba(10, 20, 45, 0.3); }
.cp-leaderboard-table tbody tr:hover { background: rgba(15, 30, 60, 0.5); }
.cp-leaderboard-table .rank { width:64px; font-weight:700; color:#fff; }
.cp-leaderboard-table .entry a { color:#77a6ff; text-decoration:none; }
.cp-leaderboard-table .entry a:hover { text-decoration:underline; }
.cp-leaderboard-table .wl, .cp-leaderboard-table .pts, .cp-leaderboard-table .pct, .cp-leaderboard-table .wk { text-align:right; width:90px; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, 'Roboto Mono', 'Courier New', monospace; }
.cp-leaderboard-table .pts { color:#ffd580; }
.cp-leaderboard-table .pct { color:#9fd3ff; }



/* Small responsive container width for content area (optional) */
.main-container {
	max-width: 960px;
	margin: 0 auto;
	padding: 1rem;
}
