/* ============================================================
   Size Chart Modal — RallyAlly
   Matches dark purple / orange brand palette
   ============================================================ */

/* ---------- Overlay ---------- */
.cv2-scm-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(10, 6, 20, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: cv2-scm-fadeIn 0.25s ease;
}
@keyframes cv2-scm-fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ---------- Modal body ---------- */
.cv2-scm-modal {
  background: linear-gradient(145deg, #1A1020 0%, #1E1428 100%);
  border: 1px solid rgba(232, 106, 51, 0.25);
  border-radius: 12px;
  width: 100%;
  max-width: 900px;
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: 0 12px 48px rgba(0,0,0,0.6), 0 0 0 1px rgba(232,106,51,0.12);
  position: relative;
  animation: cv2-scm-slideUp 0.3s ease;
}
@keyframes cv2-scm-slideUp {
  from { transform: translateY(24px); opacity: 0; }
  to   { transform: translateY(0);     opacity: 1; }
}

/* ---------- Header ---------- */
.cv2-scm-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 14px;
  border-bottom: 1px solid rgba(232,106,51,0.15);
}
.cv2-scm-title {
  font-family: 'Oswald', sans-serif;
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #E86A33;
  margin: 0;
}
.cv2-scm-close {
  background: none;
  border: 1px solid rgba(255,255,255,0.12);
  color: #ccc;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
}
.cv2-scm-close:hover {
  background: rgba(232,106,51,0.18);
  color: #E86A33;
}

/* ---------- Grid of thumbnails ---------- */
.cv2-scm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
  padding: 20px 24px 24px;
}
.cv2-scm-thumb {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.2s;
}
.cv2-scm-thumb:hover {
  border-color: rgba(232,106,51,0.5);
  transform: translateY(-2px);
}
.cv2-scm-thumb img {
  width: 100%;
  height: auto;
  display: block;
}
.cv2-scm-thumb-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: #aaa;
  padding: 6px 8px;
  text-align: center;
  background: rgba(0,0,0,0.3);
}

/* ---------- Lightbox ---------- */
.cv2-scm-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10001;
  background: rgba(0,0,0,0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  cursor: pointer;
  animation: cv2-scm-fadeIn 0.2s ease;
}
.cv2-scm-lightbox img {
  max-width: 94vw;
  max-height: 94vh;
  object-fit: contain;
  border-radius: 4px;
}
.cv2-scm-lightbox-close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.16);
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  font-size: 1.3rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  z-index: 2;
}
.cv2-scm-lightbox-close:hover {
  background: rgba(232,106,51,0.25);
}

/* ---------- Empty state ---------- */
.cv2-scm-empty {
  padding: 40px 24px;
  text-align: center;
  color: #888;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 600px) {
  .cv2-scm-modal {
    max-width: 100%;
    max-height: 92vh;
    border-radius: 8px;
  }
  .cv2-scm-grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 10px;
    padding: 14px 16px 20px;
  }
  .cv2-scm-header {
    padding: 14px 16px 10px;
  }
}
