/* CastSight AI Production Revision 12 — map recovery, clean gear cards, verified admin UI. */

/* Tackle Box card: photo, text and actions can never overlap. */
.r12-gear-card {
  display: grid !important;
  grid-template-columns: 78px minmax(0, 1fr) auto !important;
  grid-template-areas:
    "photo main actions"
    "photo relation relation";
  gap: 10px 16px !important;
  align-items: start !important;
  min-height: 138px;
  padding: 16px !important;
  overflow: hidden;
}
.r12-gear-photo { grid-area: photo; width: 78px; min-width: 78px; }
.r12-gear-photo .gear-thumb,
.r12-gear-photo .gear-thumb-empty {
  display: block;
  width: 72px !important;
  height: 72px !important;
  border-radius: 14px;
  object-fit: cover;
}
.r12-gear-card .gear-item-main { grid-area: main; min-width: 0; padding: 0 !important; }
.r12-gear-card .gear-item-main > span,
.r12-gear-card .gear-item-main > strong,
.r12-gear-card .gear-item-main > small { display: block; }
.r12-gear-card .gear-item-main > strong {
  margin: 3px 0 4px;
  color: #fff;
  font-size: 1.05rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.r12-gear-card .gear-item-main > small { color: #aebfd0; line-height: 1.4; overflow-wrap: anywhere; }
.r12-gear-card .gear-item-actions {
  grid-area: actions;
  display: grid !important;
  grid-template-columns: 1fr;
  gap: 7px !important;
  min-width: 108px;
}
.r12-gear-card .gear-item-actions button { width: 100%; min-height: 38px; }
.r12-gear-relationships {
  grid-area: relation;
  display: grid;
  gap: 5px;
  min-width: 0;
  padding-top: 2px;
  border-top: 1px solid rgba(111, 174, 220, .16);
}
.r12-gear-relationships span {
  display: block;
  color: #d7e5ef;
  font-size: .8rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.r12-gear-relationships .line-status { color: #73d7ae; }
.r12-gear-relationships .mount-status { color: #9fb4c5; }

/* Map recovery: never collapse to a thin empty bar. */
[data-view="map"] .bite-map-panel { min-height: 720px; }
#r11BiteMapRoot.r11-bite-map-root {
  min-height: 690px !important;
  width: 100%;
  visibility: visible !important;
  opacity: 1 !important;
}
#r11BiteMapRoot[hidden] { display: grid !important; }
.r12-map-recovery {
  min-height: 620px;
  display: grid;
  place-items: center;
  padding: 28px;
  border: 1px solid rgba(91, 180, 245, .24);
  border-radius: 20px;
  background: rgba(3, 23, 42, .92);
  color: #fff;
  text-align: center;
}
.r12-map-recovery p { max-width: 560px; color: #aec0cf; }
.r12-map-recovery button { min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid #48a8e8; background: #176bb7; color: #fff; font-weight: 850; cursor: pointer; }

/* Admin verification panel. */
.r12-admin-access {
  margin-bottom: 16px;
  padding: 14px 16px;
  border: 1px solid rgba(78, 174, 237, .28);
  border-radius: 14px;
  background: rgba(7, 37, 64, .82);
}
.r12-admin-access strong { display: block; color: #fff; }
.r12-admin-access span { display: block; margin-top: 4px; color: #aec1d0; }
.r12-admin-access.verified { border-color: rgba(76, 218, 155, .45); }

@media (max-width: 760px) {
  .r12-gear-card {
    grid-template-columns: 1fr !important;
    grid-template-areas: "photo" "main" "relation" "actions";
  }
  .r12-gear-photo { width: 100%; }
  .r12-gear-photo .gear-thumb,
  .r12-gear-photo .gear-thumb-empty { width: 100% !important; height: 180px !important; }
  .r12-gear-card .gear-item-actions { grid-template-columns: repeat(3, minmax(0, 1fr)); min-width: 0; }
}
