/* MARISA ONE — Fishing & Marine Operations CSS
   Extends main.css — fishing-specific styles only
   ================================================================ */

/* ── KPI grid ────────────────────────────────────────────────── */
.fishing-kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}
@media (max-width: 1200px) { .fishing-kpi-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 700px)  { .fishing-kpi-grid { grid-template-columns: repeat(2, 1fr); } }

/* ── Boat avatar ──────────────────────────────────────────────── */
.boat-avatar {
  width: 48px; height: 48px;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; flex-shrink: 0;
}
.btype-fishing    { background: linear-gradient(135deg, rgba(0,197,255,0.15), rgba(0,255,178,0.12)); }
.btype-large      { background: linear-gradient(135deg, rgba(11,79,214,0.2),  rgba(0,197,255,0.15)); }
.btype-commercial { background: linear-gradient(135deg, rgba(255,184,0,0.15), rgba(11,79,214,0.12)); }
.btype-patrol     { background: linear-gradient(135deg, rgba(255,58,58,0.15), rgba(138,43,226,0.12)); }
.btype-transport  { background: linear-gradient(135deg, rgba(0,217,126,0.15), rgba(0,197,255,0.12)); }
.btype-rec        { background: linear-gradient(135deg, rgba(138,43,226,0.15),rgba(255,58,58,0.08)); }
.btype-research   { background: linear-gradient(135deg, rgba(0,255,178,0.15), rgba(11,79,214,0.12)); }
.btype-tug        { background: linear-gradient(135deg, rgba(74,101,128,0.2), rgba(0,197,255,0.10)); }

/* ── Boat card ───────────────────────────────────────────────── */
.boat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-fast);
}
.boat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-xl); border-color: var(--brand-secondary); }
.boat-card-accent {
  height: 3px;
  background: linear-gradient(90deg, var(--brand-primary), var(--brand-secondary));
}
.boat-card-accent.at_sea     { background: linear-gradient(90deg, #00D97E, #00C5FF); }
.boat-card-accent.in_port    { background: linear-gradient(90deg, #00C5FF, #0B4FD6); }
.boat-card-accent.maintenance{ background: linear-gradient(90deg, #B44FFF, #FF3A3A); }
.boat-card-accent.emergency  { background: linear-gradient(90deg, #FF3A3A, #FFB800); animation: dangerPulse 1s infinite; }
@keyframes dangerPulse { 0%,100%{opacity:1} 50%{opacity:0.4} }

.boat-card-body { padding: var(--space-4) var(--space-5); }
.boat-card-footer {
  padding: var(--space-3) var(--space-5);
  border-top: 1px solid var(--border-subtle);
  display: flex; justify-content: space-between; align-items: center;
}

/* ── Live dot ─────────────────────────────────────────────────── */
.live-dot-wrap { display: flex; align-items: center; gap: 6px; }
.live-dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
}
.live-dot.online  { background: var(--brand-success); box-shadow: 0 0 6px var(--brand-success); animation: pulse 1.5s infinite; }
.live-dot.at_sea  { background: var(--brand-success); animation: pulse 1.5s infinite; }
.live-dot.in_port { background: var(--brand-secondary); }
.live-dot.offline { background: var(--text-muted); }
.live-dot.emergency { background: var(--brand-danger); animation: pulse 0.5s infinite; }

/* ── Fishing panel ───────────────────────────────────────────── */
.fishing-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: var(--space-5);
}
.fishing-panel-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--space-4) var(--space-6);
  border-bottom: 1px solid var(--border-subtle);
  flex-wrap: wrap; gap: var(--space-3);
}
.fishing-panel-title {
  display: flex; align-items: center; gap: var(--space-3);
  font-size: 15px; font-weight: 700; color: var(--text-primary);
}

/* ── Detail drawer ───────────────────────────────────────────── */
.fishing-drawer {
  position: fixed;
  top: var(--topbar-height); right: 0; bottom: 0;
  width: 500px;
  background: var(--bg-surface);
  border-left: 1px solid var(--border-default);
  transform: translateX(100%);
  transition: transform var(--transition-normal);
  z-index: 300;
  display: flex; flex-direction: column; overflow: hidden;
  box-shadow: var(--shadow-xl);
}

[dir="rtl"] .fishing-drawer {
  right: auto;
  left: 0;
  border-left: none;
  border-right: 1px solid var(--border-default);
  transform: translateX(-100%);
}
.fishing-drawer.open {
  display: flex !important; transform: translateX(0) !important; }
.fishing-drawer-header {
  padding: var(--space-5) var(--space-6);
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-raised);
  display: flex; align-items: center; justify-content: space-between;
  flex-shrink: 0;
}
.fishing-drawer-body   { flex: 1; overflow-y: auto; padding: var(--space-5); }
.fishing-drawer-footer {
  padding: var(--space-4) var(--space-6);
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-raised);
  display: flex; gap: var(--space-3); flex-shrink: 0;
}
.fishing-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.55);
  z-index: 299; display: none;
}
.fishing-overlay.visible { display: block; }

/* ── Detail rows ─────────────────────────────────────────────── */
.detail-section       { margin-bottom: var(--space-5); }
.detail-section-title {
  font-size: 10px; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.12em; color: var(--text-muted);
  margin-bottom: var(--space-3);
  padding-bottom: var(--space-2); border-bottom: 1px solid var(--border-subtle);
}
.detail-row {
  display: grid; grid-template-columns: 130px 1fr;
  gap: var(--space-2); padding: var(--space-2) 0;
  border-bottom: 1px solid var(--border-subtle); font-size: 13px;
}
.detail-row:last-child { border-bottom: none; }
.detail-key   { color: var(--text-muted); font-weight: 500; }
.detail-value { color: var(--text-primary); font-weight: 600; word-break: break-word; }

/* ── GPS map container ───────────────────────────────────────── */
.gps-map-wrap {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-default);
}
.boat-marker-wrap {
  display: flex; flex-direction: column; align-items: center;
}
.boat-marker-bubble {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; border: 2px solid;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
  transition: transform 0.2s;
}
.boat-marker-bubble:hover { transform: scale(1.15); }
.boat-marker-label {
  font-size: 10px; font-weight: 700; margin-top: 2px;
  background: var(--bg-surface); padding: 1px 5px;
  border-radius: 3px; white-space: nowrap;
}

/* ── Emergency panel ─────────────────────────────────────────── */
.emergency-card {
  background: rgba(255,58,58,0.08);
  border: 1px solid rgba(255,58,58,0.3);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  margin-bottom: var(--space-4);
  position: relative; overflow: hidden;
}
.emergency-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--brand-danger); animation: dangerPulse 1s infinite;
}
.sos-button {
  width: 120px; height: 120px;
  border-radius: 50%;
  background: var(--brand-danger);
  border: 4px solid rgba(255,58,58,0.3);
  color: white; font-size: 14px; font-weight: 900;
  cursor: pointer; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 4px;
  box-shadow: 0 0 0 0 rgba(255,58,58,0.4);
  animation: sosPulse 2s infinite;
  transition: transform 0.2s;
  font-family: var(--font-arabic);
}
.sos-button:hover { transform: scale(1.05); }
.sos-button:active { transform: scale(0.95); }
@keyframes sosPulse {
  0%  { box-shadow: 0 0 0 0 rgba(255,58,58,0.4); }
  70% { box-shadow: 0 0 0 20px rgba(255,58,58,0); }
  100%{ box-shadow: 0 0 0 0  rgba(255,58,58,0); }
}
.alert-item-card {
  display: flex; gap: var(--space-3);
  padding: var(--space-4);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-3);
  transition: border-color var(--transition-fast);
}
.alert-item-card.sos        { border-color: rgba(255,58,58,0.5); background: rgba(255,58,58,0.05); }
.alert-item-card.warn       { border-color: rgba(255,184,0,0.4); background: rgba(255,184,0,0.04); }
.alert-severity-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; margin-top: 4px; }

/* ── Weather widget ──────────────────────────────────────────── */
.weather-main-card {
  background: linear-gradient(135deg, rgba(11,79,214,0.15), rgba(0,197,255,0.1));
  border: 1px solid rgba(0,197,255,0.2);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  margin-bottom: var(--space-5);
}
.weather-temp { font-size: 64px; font-weight: 900; color: var(--text-primary); line-height: 1; }
.weather-desc { font-size: 16px; color: var(--text-secondary); margin-top: var(--space-2); }
.weather-stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4); margin-top: var(--space-5);
}
.weather-stat { text-align: center; }
.weather-stat-icon { font-size: 24px; margin-bottom: var(--space-2); }
.weather-stat-value { font-size: 18px; font-weight: 800; color: var(--text-primary); }
.weather-stat-label { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.sea-calm     { color: var(--brand-success); }
.sea-slight   { color: var(--brand-accent); }
.sea-moderate { color: var(--brand-warning); }
.sea-rough    { color: #FF8800; }
.sea-danger   { color: var(--brand-danger); }

/* ── Filters toolbar ─────────────────────────────────────────── */
.fishing-filters {
  display: flex; gap: var(--space-3);
  margin-bottom: var(--space-5);
  flex-wrap: wrap; align-items: center;
}
.fishing-search-box {
  background: var(--bg-raised);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  display: flex; align-items: center; gap: var(--space-3);
  padding: var(--space-2) var(--space-4); min-width: 250px;
  transition: border-color var(--transition-fast);
}
.fishing-search-box:focus-within { border-color: var(--brand-secondary); }
.fishing-search-box input {
  background: transparent; border: none; outline: none;
  color: var(--text-primary); font-size: 14px; width: 100%;
  font-family: var(--font-arabic);
}
.fishing-search-box input::placeholder { color: var(--text-muted); }

/* ── View toggle ─────────────────────────────────────────────── */
.view-toggle {
  display: flex; background: var(--bg-raised);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md); overflow: hidden;
}
.view-toggle-btn {
  padding: var(--space-2) var(--space-3); font-size: 14px;
  border: none; background: transparent; color: var(--text-muted);
  cursor: pointer; transition: background var(--transition-fast), color var(--transition-fast);
}
.view-toggle-btn.active { background: var(--brand-primary); color: white; }

/* ── Boats grid ──────────────────────────────────────────────── */
.boats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-4);
}

/* ── Reg number chip ─────────────────────────────────────────── */
.reg-chip {
  display: inline-flex; align-items: center; gap: 4px;
  font-family: var(--font-mono); font-size: 11px;
  color: var(--brand-secondary);
  background: rgba(0,197,255,0.08);
  border: 1px solid rgba(0,197,255,0.2);
  border-radius: var(--radius-full);
  padding: 2px 10px;
}

/* ── Badge extras ────────────────────────────────────────────── */
.badge-expired  { background: rgba(255,58,58,0.15);  color: var(--brand-danger);    }
.badge-expiring { background: rgba(255,184,0,0.15);  color: var(--brand-warning);   }
.badge-expiring::before { animation: pulse 1s infinite; }
.badge-completed{ background: rgba(0,217,126,0.12);  color: var(--brand-success);   }
.badge-cancelled{ background: rgba(74,101,128,0.15); color: var(--text-muted);       }
.badge-planned  { background: rgba(11,79,214,0.12);  color: var(--brand-primary);   }
.badge-secondary{ background: rgba(0,197,255,0.12);  color: var(--brand-secondary); }
.badge-maintenance { background: rgba(138,43,226,0.15); color: #B44FFF; }

/* ── Trip route viz ──────────────────────────────────────────── */
.trip-route {
  display: flex; align-items: center; gap: var(--space-3);
}
.trip-port {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.trip-port-dot {
  width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0;
}
.trip-port-dot.dep { background: var(--brand-success); }
.trip-port-dot.arr { background: var(--brand-primary); }
.trip-route-line {
  flex: 1; height: 2px; background: var(--border-default);
  position: relative; overflow: hidden;
}
.trip-route-line.underway::after {
  content: ''; position: absolute; top: 0; left: 0;
  height: 100%; width: 35%;
  background: linear-gradient(90deg, transparent, var(--brand-secondary), transparent);
  animation: sail 2s linear infinite;
}
@keyframes sail { from{transform:translateX(-100%)} to{transform:translateX(400%)} }

/* ── Fish catch table accent ─────────────────────────────────── */
.fish-weight-bar {
  width: 80px; height: 6px;
  background: var(--bg-raised);
  border-radius: var(--radius-full); overflow: hidden;
  display: inline-block;
}
.fish-weight-fill {
  height: 100%; border-radius: var(--radius-full);
  background: linear-gradient(90deg, var(--brand-secondary), var(--brand-accent));
}

/* ── Maintenance parts row ───────────────────────────────────── */
.parts-row {
  display: grid; grid-template-columns: 1fr 70px 100px 32px;
  gap: var(--space-2); align-items: center; margin-bottom: var(--space-2);
}

/* ── Report grid ─────────────────────────────────────────────── */
.fishing-report-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--space-5);
}
.fishing-report-card {
  background: var(--bg-surface); border: 1px solid var(--border-default);
  border-radius: var(--radius-lg); padding: var(--space-6);
  display: flex; flex-direction: column; gap: var(--space-4);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  cursor: pointer;
}
.fishing-report-card:hover { border-color: var(--brand-accent); box-shadow: 0 0 20px rgba(0,255,178,0.12); }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 900px) {
  .fishing-drawer { width: 100%; }
  .weather-stats-grid { grid-template-columns: repeat(2,1fr); }
}
