/* CastSight AI Production Revision 11 — dynamic Bite Map, permits, and linked tackle data. */

/* Keep the approved three-column Bite Map proportions. */
#r11BiteMapRoot.r11-bite-map-root {
  display: grid;
  grid-template-columns: minmax(250px, 300px) minmax(520px, 1fr) minmax(300px, 350px);
  gap: 16px;
  min-height: 690px;
  padding: 16px;
  border: 1px solid rgba(91, 180, 245, .22);
  border-radius: 22px;
  background: rgba(2, 18, 35, .87);
  box-shadow: 0 22px 60px rgba(0, 0, 0, .28);
}
.r11-map-sidebar,
.r11-map-details {
  min-width: 0;
  border: 1px solid rgba(91, 180, 245, .24);
  border-radius: 18px;
  background: rgba(4, 27, 50, .94);
}
.r11-map-sidebar { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.r11-map-head h2 { margin: 8px 0 4px; color: #fff; }
.r11-map-head p { margin: 0; color: #aebfd0; line-height: 1.45; }
.r11-map-search { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.r11-map-search input,
.r11-map-search button,
.r11-map-filters select,
.r11-radius-row select,
.r11-radius-row button {
  min-height: 44px;
  border-radius: 13px;
  border: 1px solid rgba(89, 177, 240, .28);
  background: #061724;
  color: #f5f9fc;
  padding: 0 12px;
}
.r11-map-search button,
.r11-radius-row button { background: #176bb7; font-weight: 800; cursor: pointer; }
.r11-map-filters { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.r11-radius-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.r11-layer-button {
  display: flex;
  flex-direction: column;
  gap: 3px;
  width: 100%;
  padding: 12px 13px;
  text-align: left;
  border-radius: 13px;
  border: 1px solid rgba(67, 161, 226, .36);
  background: #0b3558;
  color: #fff;
  cursor: pointer;
}
.r11-layer-button > span { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.r11-layer-button small { color: #a9bed0; }
.r11-layer-button.active { background: #176bb7; border-color: #4baef0; }
.r11-layer-count { display: inline-grid; place-items: center; min-width: 28px; height: 28px; border-radius: 999px; color: #061724; background: #55df9d; }
.r11-active-only { display: flex; gap: 9px; align-items: center; padding: 0 8px; color: #d8e4ee; font-weight: 700; }
.r11-layer-status { min-height: 0; color: #9eb3c6; font-size: .88rem; line-height: 1.4; }
.r11-layer-status strong { display: block; color: #fff; }
.r11-beach-list { overflow: auto; min-height: 220px; max-height: 420px; padding-right: 4px; }
.r11-beach-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  margin-bottom: 8px;
  padding: 11px 12px;
  border-radius: 13px;
  border: 1px solid rgba(73, 155, 214, .25);
  background: #092b49;
  color: #fff;
  text-align: left;
  cursor: pointer;
}
.r11-beach-item span { min-width: 0; }
.r11-beach-item strong { display: block; }
.r11-beach-item small { display: block; margin-top: 3px; color: #9eb6c9; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.r11-beach-item > b { align-self: center; }
.r11-beach-item.selected { background: #176bb7; border-color: #67bff5; }
.r11-beach-item.recent { box-shadow: inset 4px 0 #55df9d; }
.r11-beach-item.dimmed { opacity: .54; }
.r11-map-stage { position: relative; min-height: 655px; overflow: hidden; border-radius: 18px; border: 1px solid rgba(91, 180, 245, .24); background: #d7e7ef; }
.r11-google-map,
.r11-leaflet-map { position: absolute; inset: 0; width: 100%; height: 100%; }
.r11-map-loading {
  position: absolute;
  z-index: 600;
  top: 16px;
  left: 16px;
  max-width: 510px;
  padding: 12px 14px;
  border: 1px solid rgba(98, 191, 251, .34);
  border-radius: 13px;
  background: rgba(3, 22, 40, .91);
  color: #fff;
  pointer-events: none;
}
.r11-map-loading small { display: block; margin-top: 4px; color: #b8c9d7; }
.r11-heat-legend { position: absolute; z-index: 650; left: 16px; bottom: 16px; width: 210px; padding: 10px 12px; border-radius: 12px; background: rgba(3, 22, 40, .9); color: #fff; }
.r11-heat-legend i { display: block; height: 9px; margin: 7px 0 4px; border-radius: 999px; background: linear-gradient(90deg,#267ec0,#36c2af,#ffd74a,#eb6530,#c82a2a); }
.r11-heat-legend span { display: flex; justify-content: space-between; font-size: .74rem; color: #b8c9d7; }
.r11-map-details { padding: 16px; overflow-y: auto; max-height: 655px; }
.r11-map-details h2 { color: #fff; font-size: clamp(1.65rem, 2vw, 2.3rem); margin: 8px 0 10px; }
.r11-map-score { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px; border-radius: 14px; background: #123f64; }
.r11-map-score strong { font-size: 1.55rem; color: #fff; }
.r11-map-score span { color: #afc1d0; }
.r11-map-fact { padding: 13px 0; border-bottom: 1px solid rgba(148, 184, 211, .18); }
.r11-map-fact > span { display: block; margin-bottom: 5px; color: #8fa8bc; font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; }
.r11-map-fact > strong { color: #fff; line-height: 1.35; }
.r11-species-now { display: grid; gap: 7px; }
.r11-species-now div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 10px; border-radius: 10px; background: rgba(24, 70, 104, .58); }
.r11-species-now small { color: #9fb5c7; }
.r11-live-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.r11-live-grid div { padding: 9px 10px; border-radius: 10px; background: rgba(24, 70, 104, .58); }
.r11-live-grid span { display: block; color: #8fa8bc; font-size: .72rem; text-transform: uppercase; }
.r11-live-grid strong { display: block; margin-top: 3px; color: #fff; }
.r11-map-parking { display: grid; gap: 8px; }
.r11-map-parking a { padding: 10px; border-radius: 10px; background: #123f64; color: #fff; text-decoration: none; }
.r11-map-parking small { display: block; color: #a9bdcd; margin-top: 3px; }
.r11-map-actions { display: flex; gap: 8px; padding-top: 14px; }
.r11-map-actions button,
.r11-map-actions a { flex: 1; min-height: 44px; display: grid; place-items: center; border-radius: 999px; border: 1px solid #47a7e8; background: #176bb7; color: #fff; font-weight: 800; text-decoration: none; cursor: pointer; }
.r11-empty-state,
.r11-details-empty { min-height: 140px; display: grid; place-items: center; text-align: center; color: #9fb5c7; }
.r11-leaflet-score-icon { background: transparent; border: 0; }
.r11-leaflet-score-icon span { display: grid; place-items: center; width: 34px; height: 34px; border: 3px solid #fff; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); color: #fff; font-weight: 900; box-shadow: 0 4px 12px rgba(0,0,0,.35); }
.r11-leaflet-score-icon b { transform: rotate(45deg); }

/* Permit Watch */
.permit-alert-strip { display: grid; gap: 10px; margin-bottom: 16px; }
.permit-alert { padding: 13px 15px; border: 1px solid rgba(87,178,239,.26); border-radius: 14px; background: rgba(9,43,73,.88); color: #fff; }
.permit-alert.warning { border-color: rgba(231,178,58,.52); }
.permit-alert small { display: block; color: #aec1d0; margin-top: 4px; }
.permit-layout { display: grid; grid-template-columns: minmax(0,1.55fr) minmax(330px,.8fr); gap: 18px; align-items: start; }
.permit-side-column { display: grid; gap: 18px; }
.permit-filter-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0; }
.permit-filter-row select,
.my-permit-form input,
.my-permit-form select { width: 100%; min-height: 44px; border-radius: 12px; border: 1px solid rgba(86,175,237,.27); background: #061724; color: #fff; padding: 0 11px; }
.permit-catalog { display: grid; gap: 12px; }
.permit-card { padding: 15px; border-radius: 15px; border: 1px solid rgba(84,172,233,.26); background: rgba(5,29,52,.88); }
.permit-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.permit-card h3 { margin: 2px 0 3px; color: #fff; }
.permit-card p { color: #aec1d0; line-height: 1.45; }
.permit-badges { display: flex; flex-wrap: wrap; gap: 7px; margin: 10px 0; }
.permit-badge { padding: 5px 8px; border-radius: 999px; background: #123f64; color: #d9e6ef; font-size: .78rem; }
.permit-card-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.permit-card-actions a { padding: 9px 12px; border: 1px solid #3e9ddd; border-radius: 999px; color: #fff; text-decoration: none; font-weight: 800; }
.permit-watch-toggle { display: inline-flex; align-items: center; gap: 7px; color: #fff; font-weight: 800; white-space: nowrap; }
.my-permit-form { display: grid; gap: 12px; }
.my-permit-form label { display: grid; gap: 6px; color: #d8e4ed; font-weight: 700; }
.permit-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.permit-reminder-options { display: flex; flex-wrap: wrap; gap: 10px; padding: 12px; border: 1px solid rgba(87,178,239,.24); border-radius: 12px; }
.permit-reminder-options legend { padding: 0 5px; color: #fff; font-weight: 800; }
.my-permit-list { display: grid; gap: 10px; }
.my-permit-card { padding: 13px; border-radius: 13px; background: rgba(9,43,73,.9); border: 1px solid rgba(87,178,239,.25); }
.my-permit-card h3 { color: #fff; margin: 0 0 5px; }
.my-permit-card p { color: #aebfce; margin: 4px 0; }
.my-permit-card-actions { display: flex; gap: 7px; margin-top: 9px; }
.my-permit-card-actions button { min-height: 38px; padding: 0 11px; border-radius: 999px; border: 1px solid #3d98d5; background: transparent; color: #fff; cursor: pointer; }

@media (max-width: 1180px) {
  #r11BiteMapRoot.r11-bite-map-root { grid-template-columns: 270px minmax(0,1fr); }
  .r11-map-details { grid-column: 1 / -1; max-height: none; }
  .permit-layout { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  #r11BiteMapRoot.r11-bite-map-root { grid-template-columns: 1fr; padding: 10px; min-height: 0; }
  .r11-map-stage { min-height: 520px; }
  .r11-map-details { max-height: none; }
  .r11-map-filters, .r11-radius-row, .permit-filter-row, .permit-form-grid { grid-template-columns: 1fr; }
}
