/* Booking Portal Mobile Design */

:root {
  --primary-blue: #1e40af;
  --accent-green: #22c55e;
  --text-dark: #1f2937;
  --text-light: #6b7280;
  --bg-light: #f9fafb;
  --border-light: #e5e7eb;
  --orange: #f97316;
  --success: #10b981;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg-light);
}

body {
  background: #f0f4f8;
}

.booking-portal-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  max-width: 480px;
  margin: 0 auto;
  background: #f8fafc;
  position: relative;
}

/* Header */
.booking-header {
  background: #2f86d6;
  color: white;
  padding: 16px;
  padding-top: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.booking-header-left {
  flex: 1;
}

.booking-header h1 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 4px;
}

.booking-header .time {
  font-size: 12px;
  opacity: 0.9;
  margin-top: 2px;
}

.booking-header-icons {
  display: flex;
  gap: 12px;
}

.icon-btn {
  background: rgba(255, 255, 255, 0.18);
  border: none;
  color: white;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.28);
}

/* Search Bar */
.search-container {
  padding: 12px 16px;
  background: white;
  border-bottom: 1px solid var(--border-light);
}

.search-bar {
  display: flex;
  align-items: center;
  background: var(--bg-light);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 10px 12px;
  gap: 8px;
}

.search-bar input {
  flex: 1;
  border: none;
  background: none;
  outline: none;
  font-size: 14px;
  color: var(--text-dark);
}

.search-bar input::placeholder {
  color: var(--text-light);
}

/* Main Content */
.booking-main {
  flex: 1;
  overflow-y: auto;
  padding-bottom: 70px;
}

.booking-section {
  margin: 0;
  padding: 0;
}

/* Score Card */
.score-card {
  position: relative;
  isolation: isolate;
  background:
    url('../img/bookingpickle.png') -50px -44px / 212px 212px no-repeat,
    linear-gradient(90deg, #2662bf 0%, #2585d1 56%, #2170c8 100%);
  color: white;
  margin: 16px;
  border-radius: 12px;
  padding: 45px 16px 12px;
  min-height: 162px;
  display: flex;
  gap: 20px;
  align-items: center;
  box-shadow: 0 4px 12px rgba(30, 58, 138, 0.2);
  overflow: hidden;
}

.score-card::after {
  content: "";
  position: absolute;
  right: -8px;
  top: -8px;
  width: 78px;
  height: 78px;
  background: url('../img/bookingpickle.png') center center / contain no-repeat;
  opacity: 0.96;
  z-index: 1;
  pointer-events: none;
}

.score-left {
  flex: 1;
  position: relative;
  z-index: 4;
}

.score-left h3 {
  margin: 0 0 8px 0;
  font-size: 14px;
  font-weight: 600;
  opacity: 0.9;
}

.score-points {
  font-size: 48px;
  font-weight: 800;
  margin: 0 0 12px 0;
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.score-points-label {
  font-size: 14px;
  opacity: 0.9;
}

.score-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.score-stat {
  font-size: 13px;
}

.score-stat-label {
  opacity: 0.8;
  font-size: 12px;
}

.score-stat-value {
  font-weight: 700;
  font-size: 14px;
  margin-top: 2px;
}

.score-icon {
  width: 100px;
  height: 100px;
  background: transparent;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  z-index: 3;
}

.score-icon-core {
  width: 84px;
  height: 84px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.12);
  border: 2px solid rgba(255, 255, 255, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
  display: grid;
  place-items: center;
}

.score-icon-core img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  display: block;
}

.score-icon-core span {
  color: #ffffff;
  font-weight: 800;
  font-size: 30px;
  line-height: 1;
}

body.public-booking .dashboard-mobile-score {
  position: relative;
  isolation: isolate;
  border: 1px solid #2d79c9;
  background:
    url('../img/bookingpickle.png') -50px -74px / 212px 212px no-repeat,
    linear-gradient(90deg, #2662bf 0%, #2585d1 56%, #2170c8 100%);
  color: #ffffff;
  padding: 45px 16px 12px;
  min-height: 162px;
  overflow: hidden;
  box-shadow: 0 12px 24px rgba(29, 106, 182, 0.18);
}

body.public-booking .dashboard-mobile-score.is-dupr-linked {
  padding-top: 56px;
  min-height: 172px;
}

body.public-booking .dashboard-mobile-score::after {
  content: "";
  position: absolute;
  right: -18px;
  top: -55px;
  width: 98px;
  height: 98px;
  background: url('../img/bookingpickle.png') center center / contain no-repeat;
  opacity: 0.96;
  z-index: 1;
  pointer-events: none;
}

body.public-booking .dashboard-mobile-score::before {
  content: none;
}

body.public-booking .dashboard-mobile-score-copy {
  display: block;
  position: absolute;
  right: 8px;
  top: 14px;
  width: 180px;
  z-index: 4;
}

body.public-booking .dashboard-mobile-score-kicker {
  font-size: 16px;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 8px;
  text-align: left;
}

body.public-booking .dashboard-mobile-score-rating-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

body.public-booking .dashboard-mobile-score-rating-card {
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  min-height: 68px;
  padding: 8px 10px;
}

body.public-booking .dashboard-mobile-score-rating-label {
  font-size: 12px;
  font-weight: 700;
  color: rgba(234, 244, 255, 0.9);
  margin-bottom: 6px;
}

body.public-booking .dashboard-mobile-score-rating-value {
  font-size: 22px;
  line-height: 1;
  font-weight: 800;
  color: #ffffff;
}

body.public-booking .dashboard-mobile-score-rating-value-link {
  display: flex;
  align-items: center;
  color: #f09090;
  min-height: 28px;
  font-size: 8px;
}

body.public-booking .dashboard-mobile-score-rating-value-link a {
  color: #f09090;
  text-decoration: none;
  font-weight: 700;
}

body.public-booking .dashboard-mobile-score-photo-shell {
  position: absolute;
  left: 35px;
  top: 20px;
  width: 88px;
  height: 88px;
  z-index: 3;
  background:
    linear-gradient(#ffffff, #ffffff) padding-box,
    linear-gradient(90deg, #2662bf 0%, #2585d1 56%, #2170c8 100%) border-box;
  border: 5px solid transparent;
  border-radius: 999px !important;
  box-shadow: none;
  overflow: hidden;
  isolation: isolate;
}

body.public-booking .dashboard-mobile-score-photo-shell::before {
  content: none;
}

body.public-booking .dashboard-mobile-score-photo {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 999px !important;
  object-fit: cover;
  object-position: center;
  display: block;
  border: 1px solid rgba(255, 255, 255, 0.82);
}

body.public-booking .dashboard-mobile-score-photo-fallback {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: #ffffff;
  font-weight: 800;
  font-size: 22px;
  background: rgba(47, 137, 218, 0.48);
  border-radius: 999px !important;
}

body.public-booking .dashboard-mobile-score-stats {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin-top: 86px;
  border-top: 1px solid rgba(255, 255, 255, 0.28);
  padding-top: 6px;
  font-size: 9px;
  font-weight: 700;
  color: #e5f3ff;
  position: relative;
  z-index: 4;
  gap: 4px;
}

body.public-booking .dashboard-mobile-score-stats span {
  text-align: center;
  line-height: 1.1;
  min-width: 0;
}

body.public-booking .dashboard-mobile-score-stats strong {
  display: block;
  margin-bottom: 4px;
  font-size: 10px;
  color: #ffffff;
}

/* Section Header */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  padding-bottom: 0;
}

.section-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-dark);
  margin: 0;
}

.section-link {
  font-size: 13px;
  color: #2563eb;
  text-decoration: none;
  font-weight: 600;
}

/* Match/Court Cards */
.card-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.dupr-club-card {
  background: white;
  border-bottom: 1px solid var(--border-light);
  padding: 14px 16px;
  margin: 0 16px;
}

.dupr-club-card:first-of-type {
  border-radius: 8px 8px 0 0;
}

.dupr-club-card:last-of-type {
  border-radius: 0 0 8px 8px;
  border-bottom: none;
  margin-bottom: 16px;
}

.dupr-club-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.dupr-club-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-dark);
}

.dupr-club-role {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .04em;
  padding: 4px 8px;
  border-radius: 999px;
  background: #eef6ff;
  color: #2662bf;
}

.dupr-club-location {
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-light);
}

.dupr-club-id {
  margin-top: 6px;
  font-size: 11px;
  color: #6b7f95;
}

.match-card, .court-card {
  background: white;
  border-bottom: 1px solid var(--border-light);
  padding: 16px;
  display: flex;
  gap: 12px;
}

.match-card:first-of-type {
  border-radius: 8px 8px 0 0;
  margin: 0 16px 0 16px;
}

.match-card:last-of-type {
  border-radius: 0 0 8px 8px;
  border-bottom: none;
  margin: 0 16px 16px 16px;
}

.match-card {
  margin: 0 16px;
}

.match-card:not(:last-of-type) {
  border-bottom: 1px solid var(--border-light);
}

.court-card {
  margin: 0 16px;
}

.court-card:first-of-type {
  border-radius: 8px;
  margin: 0 16px 8px 16px;
}

.court-card:last-of-type {
  border-radius: 8px;
  margin: 0 16px 16px 16px;
}

.match-left {
  width: 40px;
  height: 40px;
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
  overflow: hidden;
}

.match-left-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
  padding: 4px;
  background: #ffffff;
}

.match-content {
  flex: 1;
}

.match-title {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dark);
}

.match-meta {
  font-size: 12px;
  color: var(--text-light);
  margin: 4px 0 0 0;
  display: flex;
  gap: 8px;
}

.match-meta-secondary {
  margin-top: 2px;
}

.match-meta-icon {
  color: #2563eb;
}

.match-status {
  display: inline-block;
  background: #dcfce7;
  color: #15803d;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.match-score {
  align-self: center;
  text-align: right;
  font-weight: 600;
  font-size: 14px;
}

/* Court Cards */
.court-card {
  border-radius: 8px;
  overflow: hidden;
}

.court-image {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #93c5fd 0%, #dbeafe 100%);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  flex-shrink: 0;
}

.court-info h4 {
  margin: 0 0 4px 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dark);
}

.court-info p {
  margin: 0;
  font-size: 12px;
  color: var(--text-light);
}

.rating-badge {
  background: #fffacd;
  color: #b8860b;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
}

/* Leaderboard */
.leaderboard-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: white;
  border-bottom: 1px solid var(--border-light);
}

.leaderboard-item:first-of-type {
  border-radius: 8px 8px 0 0;
  margin: 0 16px 0 16px;
}

.leaderboard-item:last-of-type {
  border-radius: 0 0 8px 8px;
  border-bottom: none;
  margin: 0 16px 16px 16px;
}

.leaderboard-item {
  margin: 0 16px;
}

.leaderboard-item:not(:last-of-type) {
  border-bottom: 1px solid var(--border-light);
}

.leaderboard-rank {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: white;
  font-size: 14px;
  flex-shrink: 0;
}

.leaderboard-rank.gold { background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%); }
.leaderboard-rank.silver { background: linear-gradient(135deg, #d1d5db 0%, #9ca3af 100%); }
.leaderboard-rank.bronze { background: linear-gradient(135deg, #fb923c 0%, #ea580c 100%); }

.leaderboard-user {
  flex: 1;
}

.leaderboard-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dark);
  margin: 0;
}

.leaderboard-you {
  font-size: 11px;
  font-weight: 700;
  color: #2563eb;
}

.leaderboard-matches {
  font-size: 12px;
  color: var(--text-light);
  margin: 0;
}

.leaderboard-score {
  text-align: right;
  font-weight: 700;
  font-size: 14px;
}

.leaderboard-score-label {
  font-size: 11px;
  color: var(--text-light);
  margin-top: 2px;
}

/* History */
.history-item {
  display: flex;
  gap: 12px;
  padding: 12px 16px;
  background: white;
  border-bottom: 1px solid var(--border-light);
  margin: 0 16px;
}

.history-item:first-of-type {
  border-radius: 8px 8px 0 0;
  margin: 0 16px 0 16px;
}

.history-item:last-of-type {
  border-radius: 0 0 8px 8px;
  border-bottom: none;
  margin: 0 16px 16px 16px;
}

.history-item:not(:last-of-type) {
  border-bottom: 1px solid var(--border-light);
}

.history-time {
  white-space: nowrap;
  color: var(--text-light);
  font-size: 12px;
}

.history-info {
  flex: 1;
}

.history-court {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dark);
  margin: 0;
}

.history-players {
  font-size: 12px;
  color: var(--text-light);
  margin: 2px 0 0 0;
}

.history-badge {
  display: inline-block;
  background: #dcfce7;
  color: #15803d;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
}

/* Bottom Navigation */
.booking-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: space-around;
  gap: 0;
  padding: 8px 0;
  max-width: 480px;
  margin: 0 auto;
}

.booking-nav a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 0;
  text-decoration: none;
  color: var(--text-light);
  font-size: 12px;
  font-weight: 600;
  transition: color 0.2s;
}

.booking-nav a.active {
  color: #2563eb;
}

.booking-nav .nav-icon {
  font-size: 20px;
}

/* Utility Classes */
.empty-state {
  text-align: center;
  padding: 32px 16px;
  color: var(--text-light);
}

.empty-state-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.muted {
  color: var(--text-light);
}

/* Responsive */
@media (max-width: 480px) {
  .booking-portal-container {
    max-width: 100%;
  }

  .booking-nav {
    max-width: 100%;
  }
}
