﻿/* Kidslympic — Mobile-first UI Theme */
/* Palette */
:root {
  --pink: #db1e69;
  --blue: #8fceef;
  --navy: #27306b;
  --red: #c32026;
  --grey: #a0a6af;

  --bg: #f7f9fc;
  --text: #1f2633;
}

/* Base */
html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  position: relative;
  min-height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji", sans-serif;
  line-height: 1.45;
  /* Reserve space for bottom nav on mobile */
  padding-bottom: calc(72px + env(safe-area-inset-bottom));
}

/* Links */
a {
  color: var(--pink);
  text-decoration: none;
}
a:hover, a:focus {
  color: #b81757;
  text-decoration: underline;
}

/* Containers */
.container,
.container-fluid {
  padding-left: 16px;
  padding-right: 16px;
}

/* Navbar (top) */
.app-navbar {
  background-color: var(--navy);
  box-shadow: 0 6px 16px rgba(39, 48, 107, 0.2);
}
.app-navbar .navbar-brand,
.app-navbar .nav-link {
  color: #fff;
}
.app-navbar .nav-link:hover,
.app-navbar .nav-link:focus,
.app-navbar .nav-link.active {
  color: var(--blue);
}
.navbar-toggler {
  border-color: rgba(255, 255, 255, 0.25);
}
.navbar-toggler:focus {
  box-shadow: 0 0 0 .25rem rgba(143, 206, 239, 0.35);
}

/* Buttons */
.btn-primary {
  color: #fff;
  background-color: var(--pink);
  border-color: var(--pink);
}
.btn-primary:hover,
.btn-primary:focus {
  background-color: #b81757;
  border-color: #b81757;
}
.btn-outline-secondary {
  color: var(--navy);
  border-color: var(--grey);
}
.btn-outline-secondary:hover,
.btn-outline-secondary:focus {
  color: var(--navy);
  background-color: var(--blue);
  border-color: var(--blue);
}
.btn-outline-success {
  color: #198754;
  border-color: #198754;
}
.btn-outline-success:hover,
.btn-outline-success:focus {
  color: #fff;
  background-color: #198754;
  border-color: #198754;
}

/* Badges */
.badge.bg-primary {
  background-color: var(--pink) !important;
}
.badge.bg-secondary {
  background-color: var(--grey) !important;
  color: #fff !important;
}

/* Cards */
.card {
  border: 0;
  border-radius: 14px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  background: #fff;
}
.card-header {
  background: #fff;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.card .badge {
  font-weight: 600;
}

/* Alerts */
.alert-success {
  background: #e9f8ef;
  border-color: #d3f1df;
  color: #146c43;
}
.alert-danger {
  background: #fdebec;
  border-color: #f8d7da;
  color: var(--red);
}
.alert-info {
  background: #eaf7fe;
  border-color: #d7eefc;
  color: #0c5460;
}
.alert-secondary {
  background: #f1f3f5;
  border-color: #e9ecef;
  color: #495057;
}

/* Forms */
.form-control:focus,
.form-select:focus {
  border-color: var(--pink);
  box-shadow: 0 0 0 .25rem rgba(219, 30, 105, 0.25);
  outline: none;
}

/* Media */
img, video {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

/* Footer */
.footer {
  position: static;
  bottom: auto;
  width: 100%;
  white-space: normal;
  line-height: 1.25;
  padding: 16px 0;
  background: #fff;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  color: var(--grey);
}
.footer a {
  color: var(--pink);
}

/* Main spacing */
main.pb-3 {
  padding-bottom: 1rem !important;
}

/* Mobile Bottom Navigation */
.mobile-bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 64px;
  padding-bottom: env(safe-area-inset-bottom);
  background: #fff;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  align-items: center;
  z-index: 1030; /* Above footer & content, below modals */
}
.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--navy);
  font-size: 12px;
  font-weight: 600;
  height: 100%;
}
.mobile-nav-item i {
  font-size: 20px;
  line-height: 1;
}
.mobile-nav-item:hover,
.mobile-nav-item:focus,
.mobile-nav-item.active {
  color: var(--pink);
}

/* Responsive */
@media (min-width: 768px) {
  /* Hide bottom nav & remove reserved space on larger screens */
  .mobile-bottom-nav { display: none; }
  body { padding-bottom: 0; }
}

/* Promo banner */
.promo-banner {
  position: relative;
  background: #fff;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 6px 16px rgba(39, 48, 107, 0.12);
  overflow: hidden;
  margin-bottom: 12px;
}
.promo-banner img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 0;
}
.promo-banner .btn-close {
  position: absolute;
  top: 10px;
  right: 10px;
  background-color: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  padding: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
@media (min-width: 768px) {
  .promo-banner {
    border-radius: 12px;
    margin-left: 16px;
    margin-right: 16px;
  }
}

/* Improve alignment when there are exactly 2 items in bottom nav */
.mobile-bottom-nav {
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
}
.mobile-nav-item span {
  line-height: 1;
}

/* Auth pages */
.auth-card {
  border: 0;
  border-radius: 16px;
  box-shadow: 0 10px 24px rgba(39, 48, 107, 0.15);
  overflow: hidden;
}
.auth-card .card-header {
  background: #fff;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.auth-card .form-label {
  font-weight: 600;
  color: var(--navy);
}
.auth-card .input-group-text {
  background: #f8f9fa;
  border-color: #e9ecef;
}
.auth-card .password-toggle {
  border-color: #e9ecef;
}
.auth-card .password-toggle i {
  pointer-events: none; /* ensure clicks hit the button */
}
.auth-card .btn-primary {
  padding: .6rem 1rem;
  font-weight: 600;
}
