/* =========================================================
   station7Seals.css
   תחנה 7, חלק א' - מעגל שש החותמות. שולחן חותמות עם שישה שקעים
   בהקסגון, מגש חותמות מתחת, לוח כתובות-היגיון מתקדם בהדרגה.
   ========================================================= */

.seals-screen-grid {
  position: absolute;
  z-index: 1;
  inset: 0;
  display: grid;
  grid-template-rows: auto 1fr auto;
  row-gap: clamp(8px, 1.4vh, 16px);
  padding: clamp(10px, 2vh, 20px) clamp(12px, 3vw, 40px);
}

.seals-header-row {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  width: min(1000px, 98%);
  margin: 0 auto;
}

.seals-stage-row {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  min-width: 0;
}

.seals-table-wrap {
  position: relative;
  width: clamp(280px, 42vh, 520px);
  aspect-ratio: 1 / 1;
  max-width: 94%;
  max-height: 100%;
}

.seals-table-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  filter: drop-shadow(0 16px 22px rgba(0, 0, 0, 0.5));
}

#seals-stage {
  position: absolute;
  inset: 0;
}

/* *** width/height נקבעים inline מ-JS (SOCKET_INNER_DIAMETER_PCT) -
   כויילו מהקוטר הפנימי האמיתי הנמדד של השקע בנכס, לא ערך משוער כאן. ***/
.seal-socket {
  position: absolute;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.08);
  cursor: pointer;
}

.seal-socket:hover,
.seal-socket:focus-visible {
  outline: 2px solid rgba(232, 194, 122, 0.5);
  outline-offset: 2px;
}

.seal-socket.has-seal {
  cursor: pointer;
}

/* *** מיכל-החותמת המונחת - ממוקם ע"י left/top (מוגדרים ב-JS מתוך אותו
   SOCKET_POS[i] כמו כפתור השקע עצמו) + translate(-50%,-50%) כאן,
   לא inset/אחוז-מתוך-הכפתור. width/height נקבעים inline מ-JS
   (SEAL_DIAMETER_PCT = 80% מ-SOCKET_INNER_DIAMETER_PCT הנמדד בפועל),
   לא ערך px/% קבוע כאן - כך שהיחס נשמר בכל רזולוציה. clip לעיגול +
   צל-מגע עדין שממחיש שהיא יושבת בתוך השקע ולא מרחפת מעליו. שכבה
   נפרדת לגמרי מכפתור השקע (pointer-events:none) - הלחיצה תמיד
   עוברת לכפתור שמתחתיה. ***/
.seal-placed-img {
  position: absolute;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  overflow: hidden;
  pointer-events: none;
  z-index: 2;
  filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.65));
  transition: filter 200ms ease;
}

/* *** <img> הפנימי בלבד - width/height/transform נקבעים inline מ-JS
   לפי SEAL_CONTENT_CORRECTION[seal] (נמדד בפועל מ-alpha bounding box
   של כל קובץ PNG בנפרד - שש החותמות מנורמלות לאותו קוטר-תוכן נראה,
   לא לאותה קופסת-תמונה גולמית). ***/
.seal-placed-img-inner {
  position: absolute;
  top: 0;
  left: 0;
  object-fit: cover;
  pointer-events: none;
}

.seal-socket.is-selected {
  box-shadow: 0 0 0 3px rgba(255, 220, 140, 0.85), 0 0 14px rgba(255, 220, 140, 0.6);
  border-radius: 50%;
}

.seal-socket.is-locked {
  box-shadow: 0 0 0 3px rgba(140, 220, 160, 0.75);
  border-radius: 50%;
  cursor: default;
}

/* *** מצב-כיול זמני למפתחת בלבד (window.Station7Finale.toggleCalibration()
   מהקונסול) - צלב קטן בדיוק על נקודת-העיגון של השקע, כדי להוכיח
   שהחותמת חופפת אליה. כבוי כברירת מחדל (hidden), לא חלק מהממשק הרגיל. ***/
.seal-socket-crosshair {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 22px;
  height: 22px;
  pointer-events: none;
  z-index: 6;
}

.seal-socket-crosshair::before,
.seal-socket-crosshair::after {
  content: "";
  position: absolute;
  background: #ff2d55;
}

.seal-socket-crosshair::before {
  left: 50%;
  top: 0;
  width: 2px;
  height: 100%;
  transform: translateX(-1px);
}

.seal-socket-crosshair::after {
  top: 50%;
  left: 0;
  height: 2px;
  width: 100%;
  transform: translateY(-1px);
}

.seal-socket.seal-ghost-outline {
  box-shadow: inset 0 0 0 3px var(--color-gold);
  border-radius: 50%;
}

.seal-socket.is-inert,
.seal-tray-card.is-inert {
  cursor: default;
  pointer-events: none;
}

.seals-tray-row {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.seals-tray {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(10px, 1.4vw, 20px);
  flex-wrap: wrap;
  padding: 10px 18px;
  border-radius: 10px;
  background: rgba(10, 8, 4, 0.5);
  border: 1px solid rgba(183, 169, 140, 0.3);
  max-width: 96%;
  min-height: clamp(64px, 8vh, 90px);
}

.seal-tray-card {
  position: relative;
  width: clamp(52px, 6vw, 76px);
  height: clamp(52px, 6vw, 76px);
  padding: 0;
  border-radius: 50%;
  border: 2px solid rgba(183, 169, 140, 0.4);
  background: rgba(30, 22, 12, 0.6);
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.seal-tray-card img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  pointer-events: none;
}

.seal-tray-card:hover,
.seal-tray-card:focus-visible {
  border-color: var(--color-gold);
}

.seal-tray-card.is-selected {
  border-color: var(--color-gold);
  box-shadow: 0 0 12px rgba(232, 194, 122, 0.7);
  transform: translateY(-3px);
}

.seal-tray-card.is-hint-focus,
.seal-socket.is-hint-focus {
  animation: station6BadgePulse 1000ms ease-in-out infinite;
}

.seals-actions-row {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

@media (prefers-reduced-motion: reduce) {
  .seal-tray-card.is-hint-focus,
  .seal-socket.is-hint-focus {
    animation: none !important;
  }
}
