@import url("home.css");

.sr-only{
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.hidden{
  display: none !important;
}

.content--locker-map{
  gap: 16px;
}

.map-toolbar{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  justify-content: space-between;
}

.map-hall-pill{
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-700);
  border: 1px solid rgba(93, 95, 239, 0.2);
}

.map-back-link{
  display: inline-flex;
  align-items: center;
  font-weight: 800;
  font-size: 0.88rem;
  color: var(--primary-700);
  text-decoration: none;
}

.map-back-link:hover{
  text-decoration: underline;
}

.map-status{
  min-height: 1.25em;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--primary-700);
  margin-top: 4px;
}

/* Interactive floor map card */
.floor-map-card{
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 22px 22px 20px;
  margin-top: 4px;
}

.floor-map-card-header{
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px 24px;
}

.floor-map-card-title-row{
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.floor-map-icon{
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.12), rgba(99, 102, 241, 0.14));
  color: #2563eb;
  display: grid;
  place-items: center;
}

.floor-map-title{
  font-size: clamp(1.15rem, 2vw, 1.35rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  margin: 0;
  line-height: 1.2;
}

.floor-map-subtitle{
  margin: 4px 0 0;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--muted);
}

.floor-legend{
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 18px;
  margin: 0;
  padding: 0;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
}

.floor-legend li{
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.floor-legend-swatch{
  width: 14px;
  height: 14px;
  border-radius: 4px;
  flex-shrink: 0;
}

.floor-legend-swatch--available{
  background: #2563eb;
  box-shadow: 0 1px 2px rgba(37, 99, 235, 0.35);
}

.floor-legend-swatch--occupied{
  background: #e2e8f0;
  border: 1px solid #cbd5e1;
}

.floor-legend-swatch--maintenance{
  background: #dc2626;
  box-shadow: 0 1px 2px rgba(220, 38, 38, 0.35);
}

.floor-legend-swatch--selected{
  background: #c2410c;
  box-shadow: 0 1px 2px rgba(194, 65, 12, 0.35);
}

.floor-map-lead{
  margin: 14px 0 0;
  font-size: 0.88rem;
  color: var(--muted);
  font-weight: 500;
  line-height: 1.5;
  max-width: 640px;
}

.floor-map-stage{
  position: relative;
  margin-top: 18px;
  min-height: 320px;
  border-radius: 16px;
  background: linear-gradient(180deg, #fafbfc 0%, #f1f5f9 100%);
  border: 1px solid #e2e8f0;
  overflow: hidden;
  padding: 20px 16px 48px;
}

.floor-plan-bg{
  position: absolute;
  inset: 0;
  color: #94a3b8;
  pointer-events: none;
}

.floor-plan-bg svg{
  width: 100%;
  height: 100%;
  display: block;
  opacity: 0.9;
}

.locker-map-viewport{
  position: relative;
  z-index: 1;
  overflow: auto;
  max-height: min(72vh, 560px);
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
}

.locker-floor-grid{
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 12px 8px;
  max-width: 720px;
  margin: 0 auto;
  transition: transform 0.18s ease;
  will-change: transform;
}

.floor-map-orientation{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  margin-top: 14px;
  padding: 0 4px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #94a3b8;
}

.floor-map-orientation span:nth-child(2){
  flex: 1;
  text-align: center;
  min-width: 140px;
}

.map-zoom-bar{
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: flex;
  gap: 8px;
  z-index: 2;
}

.map-zoom-btn{
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: var(--text);
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
  display: grid;
  place-items: center;
  transition: background 0.15s ease, transform 0.12s ease;
}

.map-zoom-btn:hover{
  background: var(--primary-soft);
  color: var(--primary-700);
}

.map-zoom-btn:active{
  transform: scale(0.96);
}

.locker-cell{
  aspect-ratio: 1;
  max-height: 76px;
  margin: 0 auto;
  width: 100%;
  border: none;
  border-radius: 22%;
  font-family: inherit;
  font-size: clamp(0.72rem, 2.1vw, 0.88rem);
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
  display: grid;
  place-items: center;
  padding: 0;
  color: #fff;
}

.locker-cell:focus-visible{
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.locker-cell--available{
  background: #2563eb;
  box-shadow: 0 2px 0 rgba(30, 64, 175, 0.35), 0 6px 14px rgba(37, 99, 235, 0.22);
}

.locker-cell--available:hover{
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.locker-cell--occupied{
  background: #e8edf3;
  color: #94a3b8;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
  cursor: not-allowed;
  font-weight: 800;
}

.locker-cell--maintenance{
  background: linear-gradient(145deg, #ef4444, #b91c1c);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 6px 14px rgba(185, 28, 28, 0.22);
  cursor: not-allowed;
  font-weight: 900;
  position: relative;
}

.locker-cell--maintenance::after{
  content: "!";
  position: absolute;
  top: 5px;
  right: 7px;
  width: 16px;
  height: 16px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: #b91c1c;
  font-size: 0.68rem;
  font-weight: 900;
}

.locker-cell--selected{
  background: linear-gradient(145deg, #ea580c, #c2410c);
  color: #fff;
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, 0.55),
    0 0 0 4px rgba(234, 88, 12, 0.35),
    0 10px 28px rgba(194, 65, 12, 0.45);
  transform: translateY(-1px);
}

.locker-cell--selected.locker-cell--available:hover{
  filter: none;
}

.floor-map-actions{
  margin-top: 18px;
  padding-top: 4px;
}

.floor-map-actions-inner{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  justify-content: space-between;
}

.floor-map-selection{
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.floor-reserve-btn{
  padding: 12px 22px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, var(--primary), #6366f1);
  color: #fff;
  font-size: 0.88rem;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(93, 95, 239, 0.28);
  transition: filter 0.15s ease, transform 0.15s ease;
}

.floor-reserve-btn:hover:not(:disabled){
  filter: brightness(1.05);
}

.floor-reserve-btn:disabled{
  opacity: 0.65;
  cursor: wait;
}

.map-empty{
  margin-top: 20px;
  padding: 28px 22px;
  text-align: center;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.map-empty-title{
  font-weight: 900;
  color: var(--text);
  margin-bottom: 8px;
}

.map-empty-text{
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.55;
  margin-bottom: 16px;
}

@media (max-width: 900px){
  .locker-floor-grid{
    grid-template-columns: repeat(4, minmax(0, 1fr));
    max-width: 420px;
  }
}

@media (max-width: 480px){
  .locker-floor-grid{
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px 6px;
  }

  .floor-map-card{
    padding: 16px 14px;
  }

  .floor-map-card-header{
    flex-direction: column;
  }
}
