/* Alphabet Planner Page Styles */

.alphabet-planner-page {
  min-height: 100vh;
  padding: 2rem 0;
  background: #f8f9fa;
}

.alphabet-planner-container {
  background: white;
  border-radius: 20px;
  padding: 2rem;
  margin: 2rem auto;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  max-width: 1400px;
}

/* Search Section (similar to landing page) */
.search-section {
  width: 100%;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32' width='25' height='25' fill='none'%3e%3ccircle fill='rgb(0 0 0 / 0.15)' id='pattern-circle' cx='10' cy='10' r='1.6257413380501518'%3e%3c/circle%3e%3c/svg%3e");
  background-repeat: repeat;
  background-size: 20px 20px;
  background-position: 0 0;
  opacity: 1;
  z-index: 1;
  padding: 2rem 4rem 1rem 4rem;
  position: relative;
  min-height: auto;
  text-align: center;
  margin-bottom: 2rem;
}

.search-section::after {
  background: linear-gradient(360deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 1) 100%);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  content: '';
  opacity: 1;
  z-index: 2;
}

.alphabet-planner-title {
  font-size: 5rem;
  line-height: 5rem;
  font-family: "Montserrat", sans-serif;
  color: var(--black-color);
  font-weight: 600;
  text-align: center;
  width: 100%;
  z-index: 3;
  position: relative;
  margin-bottom: 1rem;
  margin-top: 1rem;
}

.alphabet-planner-subtitle {
  font-size: 1.1rem;
  font-family: "Montserrat", sans-serif;
  color: var(--black-color);
  font-weight: 400;
  text-align: center;
  width: 100%;
  z-index: 3;
  position: relative;
  margin-top: 2rem;
}

/* Loading and Error Containers */
.loading-container,
.error-container {
  text-align: center;
  padding: 3rem;
  color: #6c757d;
}

.loading-spinner {
  font-size: 3rem;
  margin-bottom: 1rem;
  animation: spin 1s linear infinite;
  color: var(--color);
}

.loading-text,
.error-text {
  font-size: 1.125rem;
  margin: 0;
}

.error-container {
  background: #fee;
  border-radius: 12px;
  border: 1px solid #fcc;
}

.error-container i {
  color: #dc3545;
  font-size: 2rem;
  margin-bottom: 1rem;
}

/* Main Content Layout */
.main-content-layout {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

/* Runner Info Card */
.runner-info-card {
  background: #f8f9fa;
  border-radius: 12px;
  padding: 1.5rem;
}

.runner-info-header {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #e1e5e9;
}

.runner-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: #2c3e50;
  margin: 0 0 0.5rem 0;
}

.runner-id {
  font-size: 0.9rem;
  color: #6c757d;
  font-weight: 500;
}

.runner-stats {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.runner-stat-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.runner-stat-item .stat-label {
  font-size: 0.9rem;
  color: #6c757d;
}

.runner-stat-item .stat-value {
  font-size: 1.125rem;
  font-weight: 700;
  color: #2c3e50;
}

/* Alphabet Selector */
.alphabet-selector-section {
  background: white;
  border-radius: 12px;
  padding: 1rem 1.5rem;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.alphabet-select-label {
  margin: 0;
  color: #2c3e50;
  font-size: 1rem;
  font-weight: 600;
  white-space: nowrap;
}

.alphabet-select {
  flex: 1;
  background: white;
  border: 2px solid #e1e5e9;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  color: #2c3e50;
  cursor: pointer;
  transition: all 0.3s ease;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%232c3e50' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 12px;
  padding-right: 2.5rem;
}

.alphabet-select:hover {
  border-color: var(--color);
}

.alphabet-select:focus {
  outline: none;
  border-color: var(--color);
  box-shadow: 0 0 0 3px rgba(255, 162, 92, 0.1);
}

.alphabet-select option {
  padding: 0.5rem;
}

/* Alphabet Display Section */
.alphabet-display-section {
  background: white;
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.alphabet-display-header {
  margin-bottom: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.alphabet-display-header h2 {
  margin: 0;
  color: #2c3e50;
  font-size: 1.75rem;
  font-weight: 700;
  text-align: center;
}

.alphabet-progress-bar {
  width: 100%;
  height: 40px;
  background: #e1e5e9;
  border-radius: 20px;
  position: relative;
  overflow: hidden;
  border: 2px solid var(--color);
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color) 0%, var(--color-alt) 100%);
  transition: width 0.5s ease;
  border-radius: 18px;
}

.progress-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-weight: 700;
  font-size: 1rem;
  color: var(--black-color);
  z-index: 1;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

.alphabet-list {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.5rem;
  padding: 1rem 0;
  max-width: 600px;
  margin: 0 auto;
  width: 100%;
}

.alphabet-letter-item {
  background: white;
  border: 2px solid #e1e5e9;
  border-radius: 8px;
  padding: 0.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  min-height: 120px;
  position: relative;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  overflow: visible;
  aspect-ratio: 1;
}

.alphabet-letter-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  border-color: var(--color);
}

.alphabet-letter-item.completed {
  border-color: var(--color);
  background: linear-gradient(135deg, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0.9) 100%);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.alphabet-letter-item.incomplete {
  border-color: #e1e5e9;
  background: #fafafa;
  opacity: 0.5;
  cursor: default;
}

.letter-route-container {
  position: relative;
  width: 100%;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.3rem;
  flex-shrink: 0;
}

.letter-route {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 70px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.7;
  transition: all 0.3s ease;
  z-index: 1;
}

.alphabet-letter-item:hover .letter-route {
  opacity: 0.85;
  transform: translateX(-50%) scale(1.05);
}

.letter-route img,
.letter-route svg {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

/* Increase stroke width for SVG paths in route display */
.letter-route svg path,
.letter-route svg polyline,
.letter-route svg polygon,
.letter-route svg circle,
.letter-route svg ellipse,
.letter-route svg rect,
.letter-route svg line,
.letter-route svg g,
.letter-route svg #surface1 {
  stroke-width: 10 !important;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.letter-indicator {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  color: white;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  z-index: 2;
  background: linear-gradient(135deg, var(--color) 0%, var(--color-alt) 100%);
}

.letter-indicator.completed {
  background: linear-gradient(135deg, var(--color) 0%, var(--color-alt) 100%);
}

.letter-indicator.incomplete {
  background: #6c757d;
  position: relative;
  top: auto;
  left: auto;
  transform: none;
  margin: 0 auto 0.5rem;
}

.letter-flag {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 24px;
  height: 24px;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  border: 2px solid white;
  z-index: 2;
}

.letter-flag img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}


.letter-content {
  text-align: center;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  gap: 0.5rem;
}

.letter-parkrun {
  font-size: 0.75rem;
  font-weight: 600;
  color: #2c3e50;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  min-height: 2rem;
}

.letter-date {
  font-size: 0.7rem;
  color: #6c757d;
  font-weight: 500;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 1024px) {
  .main-content-layout {
    gap: 1.5rem;
  }
  
  .alphabet-list {
    grid-template-columns: repeat(5, 1fr);
    gap: 0.5rem;
    max-width: 500px;
  }
  
  .search-section {
    padding: 1rem 2rem 0.5rem 2rem;
  }
  
  .alphabet-planner-title {
    font-size: 3rem;
    line-height: 3rem;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
  }
  
  .alphabet-planner-subtitle {
    font-size: 1rem;
  }
}

@media (max-width: 768px) {
  .alphabet-planner-container {
    margin: 1rem;
    padding: 1rem;
    max-width: none;
  }
  
  .search-section {
    padding: 1rem 2rem 0.5rem 2rem;
  }

  .alphabet-planner-title {
    font-size: 3rem;
    line-height: 3rem;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
  }

  .alphabet-planner-subtitle {
    font-size: 1rem;
  }
  
  .giant-search-wrapper {
    width: 100%;
    display: flex;
    padding: 0rem;
    z-index: 3;
    position: relative;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
  }
  
  .giant-search {
    height: 4rem;
    max-width: 100%;
  }
  
  .giant-search input {
    font-size: 1.5rem;
    letter-spacing: 0.5rem;
  }
  
  .giant-search-button {
    font-size: 1rem;
  }
  
  .main-layout {
    gap: 1rem;
  }
  
  .map-section .card {
    height: 50vh;
  }
  
  .sidebar-section {
    flex-direction: column;
    gap: 1rem;
  }
  
  .alphabet-list {
    grid-template-columns: repeat(5, 1fr);
    gap: 0.5rem;
    max-width: 500px;
  }
  
  .alphabet-letter-item {
    min-height: 110px;
    padding: 0.5rem;
  }
  
  .letter-route-container {
    height: 60px;
    margin-bottom: 0.3rem;
  }
  
  .letter-route {
    width: 60px;
    height: 60px;
  }
  
  .letter-indicator {
    width: 28px;
    height: 28px;
    font-size: 0.9rem;
  }
  
  .letter-flag {
    width: 20px;
    height: 20px;
    top: 0.4rem;
    right: 0.4rem;
  }
  
  .letter-parkrun {
    font-size: 0.7rem;
    min-height: 1.8rem;
  }
  
  .letter-date {
    font-size: 0.65rem;
  }
  
  .letter-parkrun {
    font-size: 0.8rem;
  }
  
  .letter-date {
    font-size: 0.75rem;
  }
}

@media (max-width: 599px) {
  .giant-search-wrapper {
    width: 100%;
    display: flex;
    padding: 0rem;
    z-index: 3;
    position: relative;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
  }
  
  .giant-search {
    height: 4rem;
    max-width: 100%;
  }
  
  .giant-search input {
    font-size: 1.5rem;
    letter-spacing: 0.5rem;
  }
  
  .giant-search-button {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .alphabet-planner-container {
    margin: 0.5rem;
    padding: 0.75rem;
  }
  
  .search-section {
    padding: 1rem;
  }
  
  .alphabet-planner-title {
    font-size: 2rem;
    line-height: 2rem;
  }
  
  .alphabet-display-section {
    padding: 1rem;
  }
  
  .alphabet-display-header h2 {
    font-size: 1.25rem;
  }
  
  .alphabet-progress-bar {
    height: 32px;
  }
  
  .progress-text {
    font-size: 0.85rem;
  }
  
  .alphabet-selector-section {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }
  
  .alphabet-select-label {
    font-size: 0.9rem;
  }
  
  .alphabet-select {
    font-size: 0.85rem;
    padding: 0.6rem 0.9rem;
    padding-right: 2.2rem;
  }
  
  .alphabet-list {
    grid-template-columns: repeat(5, 1fr);
    gap: 0.35rem;
    max-width: 400px;
  }
  
  .alphabet-letter-item {
    min-height: 90px;
    padding: 0.4rem;
  }
  
  .letter-route-container {
    height: 50px;
    margin-bottom: 0.25rem;
  }
  
  .letter-route {
    width: 50px;
    height: 50px;
  }
  
  .letter-indicator {
    width: 24px;
    height: 24px;
    font-size: 0.8rem;
  }
  
  .letter-flag {
    width: 18px;
    height: 18px;
    top: 0.3rem;
    right: 0.3rem;
  }
  
  .letter-parkrun {
    font-size: 0.65rem;
    min-height: 1.6rem;
  }
  
  .letter-date {
    font-size: 0.6rem;
  }
  
  .letter-indicator {
    width: 40px;
    height: 40px;
    font-size: 1.25rem;
  }
  
  .letter-parkrun {
    font-size: 0.75rem;
    min-height: 2.25rem;
  }
  
  .letter-date {
    font-size: 0.7rem;
  }
}
/* Search Input Styles (from landing page - using --color variable) */
.giant-search-wrapper {
  width: 100%;
  display: flex;
  padding: 3rem;
  z-index: 3;
  position: relative;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  gap: 1rem;
  margin-top: 2rem;
}

.giant-search {
  width: 100%;
  max-width: 500px;
  border-radius: 50px;
  height: 6rem;
  background: #fff;
  outline: none;
  border: 3px solid #000;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  z-index: 5;
  position: relative;
  transition: .3s;
  display: flex;
  align-content: center;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding: 2px;
  gap: 2px;
}

.giant-search input {
  text-align: center;
  letter-spacing: 1rem;
  font-size: 2.5rem;
  font-weight: 500;
  color: #000;
  height: 100%;
  border-radius: 25px 0 0 25px;
  width: 100%;
  border: 0px;
  outline: none;
  text-transform: uppercase;
}

.giant-search-button {
  height: 100%;
  aspect-ratio: 1/1;
  border-radius: 50%;
  background: var(--color) !important;
  color: var(--white-color);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  font-weight: 800;
  font-size: 1.3rem;
  border: 2px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  transition: .3s;
  position: relative;
}

.giant-search-button:hover {
  font-weight: 1000;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
  transform: scale(1.05);
  font-size: 1.6rem;
}

.giant-search:hover input{
  color: var(--color);
  font-weight: 600;
}

.giant-search input:focus{
  color: var(--color);
}

.giant-search:focus-within {
  color: var(--color);
  font-weight: 600;
  outline: 2px solid var(--color);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

@-moz-keyframes bounce {

  0%,
  20%,
  50%,
  80%,
  100% {
    -moz-transform: translateY(0);
    transform: translateY(0);
  }

  40% {
    -moz-transform: translateY(-30px);
    transform: translateY(-30px);
  }

  60% {
    -moz-transform: translateY(-15px);
    transform: translateY(-15px);
  }
}

@-webkit-keyframes bounce {

  0%,
  20%,
  50%,
  80%,
  100% {
    -webkit-transform: translateY(0);
    transform: translateY(0);
  }

  40% {
    -webkit-transform: translateY(-30px);
    transform: translateY(-30px);
  }

  60% {
    -webkit-transform: translateY(-15px);
    transform: translateY(-15px);
  }
}

@keyframes bounce {

  0%,
  20%,
  50%,
  80%,
  100% {
    -moz-transform: translateY(0);
    -ms-transform: translateY(0);
    -webkit-transform: translateY(0);
    transform: translateY(0);
  }

  40% {
    -moz-transform: translateY(-30px);
    -ms-transform: translateY(-30px);
    -webkit-transform: translateY(-30px);
    transform: translateY(-30px);
  }

  60% {
    -moz-transform: translateY(-15px);
    -ms-transform: translateY(-15px);
    -webkit-transform: translateY(-15px);
    transform: translateY(-15px);
  }
}

.arrow {
  width: 40px;
  height: 40px;
  color: var(--black-color);
  font-size: 3rem;
}

.bounce {
  -moz-animation: bounce 2s infinite;
  -webkit-animation: bounce 2s infinite;
  animation: bounce 2s infinite;
}