/**
 * Estilos para Pick-a-Spot
 */

/* Variables - usar las del tema si están disponibles */
:root {
  --lapso-primary: #992d2d;
  --lapso-primary-light: #d8b8b3;
  --lapso-bg: #f3f1ec;
  --lapso-white: #fff;
}

/* Wrapper principal */
.lapso-pick-spot-wrapper {
  font-family: "Matter", "Montserrat", sans-serif;
  max-width: 100%;
  margin: 0 auto;
  padding: 20px;
}

/* Botones Mobile */
.btn-mobile {
  display: none;
}

@media (max-width: 600px) {
  .btn-mobile {
    display: block;
    margin: 5px 0;
    width: 100%;
  }
}

/* Header Buttons */
.header-buttons {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 10px 0 20px;
}

@media (max-width: 600px) {
  .header-buttons {
    display: none;
  }
}

.left-button {
  display: flex;
  align-items: center;
  z-index: 999;
}

.left-button i {
  margin-right: 5px;
}

/* Botones */
.btn-primary,
.btn-secundary {
  padding: 10px 20px;
  border-radius: 20px;
  cursor: pointer;
  font-family: "Matter", "Montserrat", sans-serif;
  font-weight: 600;
  font-size: 14px;
  min-width: 200px;
  transition: all 0.3s ease;
}

.btn-primary {
  background-color: var(--lapso-primary, #992d2d);
  color: var(--lapso-white, #fff);
  border: 1px solid var(--lapso-primary, #992d2d);
}

.btn-primary:hover:not([disabled]) {
  background-color: #7a2424;
}

.btn-primary[disabled] {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-secundary {
  padding: 10px 20px;
  background-color: transparent;
  color: var(--lapso-primary, #992d2d);
  border: 1px solid var(--lapso-primary, #992d2d);
}

.btn-secundary:hover {
  background-color: var(--lapso-primary, #992d2d);
  color: var(--lapso-white, #fff);
}

#confirm-btn {
  padding: 10px 40px;
}

/* Credits Info */
.credits-info {
  margin-left: 10px;
  color: var(--lapso-primary, #992d2d);
  border-bottom: 1px solid var(--lapso-primary, #992d2d);
  font-family: "Matter", "Montserrat", sans-serif;
  font-size: 18px;
  font-weight: 700;
  line-height: 20px;
  letter-spacing: 0.02em;
  text-align: left;
  cursor: pointer;
}

.credits-info a {
  color: inherit;
  text-decoration: none;
}

.credits-info a:hover {
  opacity: 0.8;
}

/* Container Ride */
.container_ride {
  font-family: "Matter", "Montserrat", sans-serif;
  text-align: center;
  margin: 20px auto;
}

@media (max-width: 736px) {
  .container_ride {
    width: 90%;
  }
}

/* Header Ride */
.header_ride {
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Coach image como spot */
.header_ride img.coach-image {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background-color: var(--lapso-white, #fff);
  border: 2px solid transparent;
  object-fit: cover;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.header_ride_text {
  margin-bottom: 10px;
}

.header_ride_p {
  text-transform: uppercase;
}

.reserva-title {
  font-family: "Matter", "Montserrat", sans-serif;
  font-size: 40px;
  font-weight: 700;
  line-height: 48.76px;
  letter-spacing: 0.02em;
  text-align: center;
  margin: 0;
}

@media (max-width: 600px) {
  .reserva-title {
    font-size: 26px;
    line-height: 1.2;
  }
}

.reserva-text {
  font-family: "Matter", "Montserrat", sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 21.94px;
  letter-spacing: 0.02em;
  text-align: center;
  margin: 5px 0;
}

/* Availability Legend */
.availability {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  margin: 10px 0;
  font-size: 14px;
}

.circle {
  height: 10px;
  width: 10px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 5px;
}

.circle.available {
  background-color: var(--lapso-white, #fff);
  border: 1px solid #ccc;
}

.circle.occupied {
  background-color: var(--lapso-primary-light, #d8b8b3);
}

/* Seating Chart Container */
#seating-chart-container {
  display: flex;
  justify-content: center;
  padding: 20px 0;
}

.seating-chart {
  justify-content: center;
  display: grid;
  justify-items: center;
  grid-template-columns: repeat(var(--columns, 8), 69px);
  gap: 10px;
  width: 100%;
  max-width: fit-content;
}

/* Seats */
.seat {
  width: 69px;
  height: 69px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 50%;
  background-color: var(--lapso-white, #fff);
  cursor: pointer;
  font-weight: 600;
  font-size: 16px;
  border: 2px solid transparent;
  transition: all 0.2s ease;
}

.seat:hover:not(.taken) {
  border-color: var(--lapso-primary, #992d2d);
  transform: scale(1.05);
}

.seat:focus {
  outline: 2px solid var(--lapso-primary, #992d2d);
  outline-offset: 2px;
}

.seat.taken {
  background-color: var(--lapso-primary-light, #d8b8b3);
  color: var(--lapso-white, #fff);
  cursor: not-allowed;
}

.seat.selected {
  background-color: var(--lapso-primary, #992d2d);
  color: var(--lapso-white, #fff);
}

.spacer {
  visibility: hidden;
}

/* Loading Skeleton */
.pick-spot-loading {
  display: flex;
  justify-content: center;
  padding: 20px;
}

.seating-chart-skeleton {
  display: grid;
  grid-template-columns: repeat(8, 69px);
  gap: 10px;
  justify-content: center;
  width: 100%;
}

.seat-skeleton {
  width: 69px;
  height: 69px;
  border-radius: 50%;
  background: linear-gradient(
    90deg,
    var(--lapso-primary-light, #d8b8b3) 25%,
    #e8d8d5 50%,
    var(--lapso-primary-light, #d8b8b3) 75%
  );
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s ease-in-out infinite;
}

@keyframes skeleton-shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

@media (max-width: 600px) {
  .seating-chart-skeleton {
    grid-template-columns: repeat(8, 36px);
    gap: 3px;
  }

  .seat-skeleton {
    width: 36px;
    height: 36px;
  }
}

@media (max-width: 400px) {
  .seating-chart-skeleton {
    grid-template-columns: repeat(8, 28px);
    gap: 2px;
  }

  .seat-skeleton {
    width: 28px;
    height: 28px;
  }
}

/* Error */
.pick-spot-error {
  text-align: center;
  padding: 40px;
}

.pick-spot-error p {
  font-size: 16px;
  color: var(--lapso-primary, #992d2d);
  margin-bottom: 20px;
}

/* Mobile Styles */
@media (max-width: 600px) {
  .seating-chart {
    gap: 3px;
    width: 100%;
    max-width: 100%;
    padding: 10px 0;
    margin: 0 auto;
  }

  .seat {
    width: 36px;
    height: 36px;
    font-size: 11px;
  }

  .header_ride img.coach-image {
    width: 80px;
    height: 80px;
  }

  .header_ride h1 {
    font-size: 1.2em;
  }

  .header_ride p {
    font-size: 0.9em;
  }

  .btn-primary,
  .btn-secundary {
    min-width: auto;
    width: 100%;
  }
}

@media (min-width: 601px) and (max-width: 1024px) {
  .container_ride {
    width: min(100%, 920px);
  }

  .seating-chart-skeleton {
    grid-template-columns: repeat(8, minmax(0, 56px));
    gap: 6px;
  }

  .seat-skeleton {
    width: 56px;
    height: 56px;
  }
}

/* Extra Small Screens */
@media (max-width: 400px) {
  .seat {
    width: 28px;
    height: 28px;
    font-size: 10px;
  }
}

/* Lapso Reunion Warning Modal */
.lapso-warning-modal {
  display: none;
  position: fixed;
  z-index: 1001;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: var(--lapso-primary, #992d2d);
  backdrop-filter: blur(3px);
}

.lapso-warning-content {
  background: var(--lapso-primary, #992d2d);
  margin: 15% auto;
  padding: 25px;
  border: none;
  border-radius: 15px;
  width: 85%;
  max-width: 380px;
  position: relative;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  from {
    transform: translateY(-50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.lapso-warning-close {
  color: white;
  float: right;
  font-size: 24px;
  font-weight: bold;
  position: absolute;
  right: 20px;
  top: 15px;
  cursor: pointer;
  transition: color 0.3s ease;
}

.lapso-warning-close:hover,
.lapso-warning-close:focus {
  color: white;
  text-decoration: none;
}

.lapso-warning-title {
  font-family: "Matter", "Montserrat", sans-serif;
  font-size: 24px;
  font-weight: 700;
  text-align: center;
  color: white;
  margin: 0 0 20px 0;
  line-height: 1.3;
}

.lapso-warning-text {
  font-family: "Matter", "Montserrat", sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
  color: #2c3e50;
  text-align: left;
  margin: 20px 0 25px 0;
  padding: 20px;
  background-color: var(--lapso-bg, #f3f1ec);
  border-left: 4px solid #ffc107;
  border-radius: 5px;
}

@media (max-width: 600px) {
  .lapso-warning-content {
    margin: 25% auto;
    padding: 20px 15px;
    width: 90%;
    max-width: 320px;
  }

  .lapso-warning-title {
    font-size: 18px;
  }

  .lapso-warning-text {
    font-size: 14px;
    padding: 15px;
    margin: 15px 0 20px 0;
  }
}

/* ===== Modal Secundario (pick-spot) ===== */
.lapso-pick-spot-wrapper .lapso-modal--secondary .lapso-modal-container {
  background-color: #f4f3ec;
  color: #000;
  min-height: 300px;
  text-align: center;
  height: auto;
  max-width: 500px;
  padding: 40px 30px;
  animation: lapso-modal-in 0.25s ease;
}

.lapso-pick-spot-wrapper .lapso-modal--secondary .lapso-modal-close {
  color: var(--lapso-primary, #992d2d);
  font-size: 30px;
  top: 16px;
  right: 20px;
}

.lapso-pick-spot-wrapper .lapso-modal--secondary .lapso-modal-close::before,
.lapso-pick-spot-wrapper .lapso-modal--secondary .lapso-modal-close::after {
  display: none;
}

.lapso-pick-spot-wrapper .lapso-modal--secondary .lapso-modal-close:hover {
  opacity: 0.7;
}

.lapso-pick-spot-wrapper .lapso-modal--secondary .lapso-modal-title {
  font-family: "Matter", "Montserrat", sans-serif;
  font-style: normal;
  font-size: 36px;
  font-weight: 700;
  color: var(--lapso-primary, #992d2d);
  margin: 0 0 20px;
}

.lapso-pick-spot-wrapper .lapso-modal--secondary .lapso-modal-text {
  font-size: 16px;
  line-height: 1.6;
  color: #333;
  margin: 0 0 24px;
}

.lapso-pick-spot-wrapper .lapso-modal--secondary .lapso-modal-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
}

.lapso-pick-spot-wrapper .lapso-modal--secondary .lapso-modal-btn-primary {
  display: inline-block;
  padding: 12px 48px;
  background: var(--lapso-primary, #992d2d);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  border: 2px solid var(--lapso-primary, #992d2d);
  border-radius: 25px;
  cursor: pointer;
  font-family: "Matter", "Montserrat", sans-serif;
  letter-spacing: 0.36px;
  transition:
    opacity 0.2s ease,
    transform 0.15s ease;
  text-decoration: none;
}

.lapso-pick-spot-wrapper
  .lapso-modal--secondary
  .lapso-modal-btn-primary:hover:not(:disabled) {
  opacity: 0.9;
  transform: translateY(-1px);
}

.lapso-pick-spot-wrapper .lapso-modal--secondary .lapso-modal-btn-secondary {
  display: inline-block;
  padding: 12px 48px;
  background: #fff;
  color: var(--lapso-primary, #992d2d);
  font-size: 16px;
  font-weight: 700;
  border: 2px solid var(--lapso-primary, #992d2d);
  border-radius: 25px;
  cursor: pointer;
  font-family: "Matter", "Montserrat", sans-serif;
  letter-spacing: 0.36px;
  transition:
    opacity 0.2s ease,
    transform 0.15s ease;
  text-decoration: none;
}

.lapso-pick-spot-wrapper
  .lapso-modal--secondary
  .lapso-modal-btn-secondary:hover {
  opacity: 0.85;
}

@keyframes lapso-modal-in {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@media (max-width: 600px) {
  .lapso-pick-spot-wrapper .lapso-modal--secondary .lapso-modal-container {
    max-width: 90%;
    padding: 30px 20px;
  }

  .lapso-pick-spot-wrapper .lapso-modal--secondary .lapso-modal-title {
    font-size: 28px;
  }
}

/* Skeleton Loading Animation */
@keyframes skeleton-pulse {
  0% {
    opacity: 0.6;
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0.6;
  }
}

.skeleton-text {
  display: inline-block;
  color: var(--lapso-primary-light, #d8b8b3);
  animation: skeleton-pulse 1.5s ease-in-out infinite;
}

.skeleton-title {
  font-size: inherit;
}

.skeleton-info {
  font-size: inherit;
}

/* Coach Initials Fallback */
.coach-initials {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background-color: var(--lapso-primary, #992d2d);
  color: var(--lapso-white, #fff);
  font-family: "Matter", "Montserrat", sans-serif;
  font-size: 40px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 15px 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Coach Image Skeleton */
.coach-image-skeleton {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background-color: var(--lapso-primary-light, #d8b8b3);
  margin: 15px 0;
  animation: skeleton-pulse 1.5s ease-in-out infinite;
}

/* Coach Image - Estilo como spot */
.coach-image {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background-color: var(--lapso-white, #fff);
  border: 2px solid transparent;
  object-fit: cover;
  margin: 15px 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.coach-image[src=""],
.coach-image:not([src]) {
  background-color: var(--lapso-primary-light, #d8b8b3);
}

@media (max-width: 600px) {
  .coach-image,
  .coach-image-skeleton,
  .coach-initials {
    width: 80px;
    height: 80px;
  }

  .coach-initials {
    font-size: 28px;
  }
}
