/* Seaty Operator Dashboard Marketing Styles */

/* Base Dashboard App Frame */
.op-dash-frame {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  display: flex;
  font-family: var(--font-body);
}

.hero-floating-dash {
  position: absolute;
  bottom: -90px;
  right: -60px;
  width: 320px;
  height: 240px;
  transform: scale(0.85);
  box-shadow: 0 20px 40px rgba(0,0,0,0.5);
  z-index: 10;
}

@media (max-width: 600px) {
  .hero-floating-dash {
    bottom: -40px;
    right: 0;
    transform: scale(0.65);
    transform-origin: bottom right;
  }
}

.op-sidebar {
  width: 220px;
  background: var(--bg-surface-alt);
  border-right: 1px solid var(--border-color);
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.op-sidebar-item {
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.op-sidebar-item.active {
  background: var(--c-navy);
  color: #fff;
}

.op-main {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  background: #f8fafc;
}

.op-topbar {
  height: 60px;
  background: #fff;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  padding: 0 var(--space-6);
  gap: var(--space-6);
}

.op-stat {
  display: flex;
  flex-direction: column;
}

.op-stat-val {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--c-navy);
}

.op-stat-lbl {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.op-content-grid {
  display: flex;
  flex-grow: 1;
  padding: var(--space-6);
  gap: var(--space-6);
  height: 480px;
}

.op-map-area {
  flex-grow: 1;
  background: #c3d9e8 url('../assets/images/srilanka_map.png') no-repeat center center;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  position: relative;
  overflow: hidden;
  background-size: 180%;
  background-position: 45% 65%;
}

.op-right-panel {
  width: 280px;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.op-panel-card {
  background: #fff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  padding: var(--space-4);
  box-shadow: var(--shadow-sm);
}

.op-vehicle-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  max-height: 250px;
  overflow: hidden;
}

.op-vehicle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--border-color);
}

.op-vehicle:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.op-vehicle-id {
  font-weight: 700;
  color: var(--c-navy);
}

.op-vehicle-route {
  color: var(--text-secondary);
  font-size: 0.7rem;
}

.op-vehicle-status {
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 700;
}

.op-status-green { background: #dcfce7; color: #166534; }
.op-status-yellow { background: #fef9c3; color: #854d0e; }
.op-status-gray { background: #f1f5f9; color: #475569; }

/* Large Map Previews */
.op-live-map {
  position: relative;
  width: 100%;
  height: 400px;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: #c3d9e8 url('../assets/images/srilanka_app_map.png') no-repeat center center;
  background-size: cover;
  box-shadow: inset 0 0 20px rgba(0,0,0,0.05);
}

.map-idle-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  background: #2a3441;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 6px;
  z-index: 10;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}
.map-idle-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #64748b;
}

.map-control-group {
  position: absolute;
  top: 16px;
  right: 16px;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  z-index: 10;
}
.map-zoom-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-bottom: 1px solid #eee;
  cursor: pointer;
  color: var(--c-navy);
}
.map-zoom-btn:last-child {
  border-bottom: none;
}
.map-zoom-btn:hover {
  background: #f8fafc;
}

.map-info-card {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  border-radius: 16px;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  z-index: 10;
  width: 90%;
  max-width: 340px;
}
.map-info-icon {
  color: var(--text-muted);
}
.map-info-text {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.speed-tag {
  position: absolute;
  left: 32px;
  top: 50%;
  transform: translateY(-50%);
  background: #1e293b;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 4px;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  pointer-events: none;
}
.speed-tag.green::before {
  content: '';
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--c-success);
}
.speed-tag.purple::before {
  content: '';
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #a855f7;
}

.op-bus-marker {
  width: 32px;
  height: 32px;
  background: var(--c-navy);
  border: 4px solid #fff;
  border-radius: 50%;
  position: absolute;
  top: -16px; left: -16px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.op-bus-marker.green { background: var(--c-success); }
.op-bus-marker.yellow { background: var(--c-warning); }
.op-bus-marker.blue { background: var(--c-blue); }

/* --- Advanced Live Map Animations --- */
@keyframes flowRoute {
  to { stroke-dashoffset: -42; }
}
.op-live-route {
  stroke-dasharray: 8 6;
  animation: flowRoute 1.5s linear infinite;
  opacity: 0.8 !important;
}

@keyframes gpsPulse {
  0% { transform: translate(-50%, -50%) scale(1); opacity: 0.8; }
  100% { transform: translate(-50%, -50%) scale(4); opacity: 0; }
}
.op-radar-pulse {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: inherit;
  z-index: -1;
  animation: gpsPulse 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.op-bus-marker::before {
  content: '';
  position: absolute;
  inset: -18px;
  border-radius: 50%;
  background: inherit;
  opacity: 0.35;
  animation: radarPulse 2s infinite;
}

/* Feature Cards Previews */
.op-fp-analytics {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 100px;
  padding-bottom: 20px;
}
.op-bar {
  width: 24px;
  background: var(--c-blue);
  border-radius: 4px 4px 0 0;
  animation: growBar 3s ease-out infinite alternate;
}
@keyframes growBar {
  0% { transform: scaleY(0.1); transform-origin: bottom; }
  100% { transform: scaleY(1); transform-origin: bottom; }
}

.op-fp-swap {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 80%;
}
.op-bus-card {
  background: #fff;
  padding: 10px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--c-navy);
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}
.op-swap-anim {
  animation: swapOutIn 6s infinite;
}
@keyframes swapOutIn {
  0%, 30% { transform: translateX(0); opacity: 1; content: "Bus A (LK-102)"; }
  40% { transform: translateX(100%); opacity: 0; }
  50% { transform: translateX(-100%); opacity: 0; }
  60%, 100% { transform: translateX(0); opacity: 1; content: "Bus B (LK-990)"; }
}

.op-fp-schedule {
  width: 80%;
  background: #fff;
  border-radius: 8px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.op-sch-item {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  border-bottom: 1px solid #eee;
  padding-bottom: 4px;
}
.op-sch-item:last-child { border-bottom: none; }
.op-sch-status {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--c-success);
  animation: blinkStatus 2s infinite;
}
@keyframes blinkStatus {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.op-fp-booking {
  width: 80%;
  background: #fff;
  padding: 16px;
  border-radius: 12px;
  text-align: center;
}
.op-bk-progress {
  height: 8px;
  background: #eee;
  border-radius: 4px;
  overflow: hidden;
  margin-top: 8px;
}
.op-bk-fill {
  height: 100%;
  background: var(--c-success);
  width: 0%;
  animation: fillBook 4s infinite;
}
@keyframes fillBook {
  0% { width: 40%; }
  50%, 100% { width: 85%; }
}

.op-fp-staff {
  width: 80%;
  background: #fff;
  padding: 12px;
  border-radius: 8px;
}
.op-staff-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.op-staff-check {
  color: var(--c-success);
  transform: scale(0);
  animation: popCheck 4s infinite;
}
@keyframes popCheck {
  0%, 20% { transform: scale(0); }
  30%, 100% { transform: scale(1); }
}

/* Analytics large section */
.op-analytics-dash {
  background: var(--c-navy);
  border-radius: var(--radius-xl);
  padding: var(--space-10);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-8);
}
.op-chart-box {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
}
.op-chart-title {
  color: #fff;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: var(--space-4);
}

/* Workflow */
.op-workflow {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  position: relative;
  max-width: 900px;
  margin: 0 auto;
}
.op-workflow::before {
  content: '';
  position: absolute;
  top: 32px; left: 32px; right: 32px;
  height: 2px;
  background: linear-gradient(90deg, var(--c-blue) 50%, transparent 50%);
  background-size: 10px 10px;
  z-index: 0;
  animation: flowLine 2s linear infinite;
}
@keyframes flowLine {
  0% { background-position: 0 0; }
  100% { background-position: -20px 0; }
}
.op-wf-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  z-index: 1;
  background: var(--bg-page);
  padding: 0 var(--space-2);
}
.op-wf-icon {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--c-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(37,99,235,0.2);
  color: var(--c-blue);
}
.op-wf-text {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.op-wf-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--c-navy);
  text-align: center;
  max-width: 80px;
}
.op-wf-desc {
  display: none; /* Hidden on desktop, shown on mobile */
}

@media (max-width: 900px) {
  .op-dash-frame {
    flex-direction: column;
  }
  .op-sidebar {
    width: 100%;
    flex-direction: row;
    overflow-x: auto;
  }
  .op-content-grid {
    flex-direction: column;
    height: auto;
  }
  .op-map-area {
    min-height: 250px;
  }
  .op-right-panel {
    width: 100%;
  }
  .op-analytics-dash {
    grid-template-columns: 1fr;
  }
  .op-workflow {
    flex-direction: column;
    gap: var(--space-8);
  }
  .op-workflow::before {
    top: 32px; bottom: 32px; left: 32px; width: 2px; height: auto; right: auto;
    background: linear-gradient(180deg, var(--c-blue) 50%, transparent 50%);
    background-size: 10px 10px;
  }
  .op-wf-step {
    flex-direction: row;
    padding: var(--space-4);
    width: 100%;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.03);
    align-items: center;
    gap: var(--space-4);
  }
  .op-wf-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    align-items: flex-start;
  }
  .op-wf-label {
    text-align: left;
    max-width: none;
    font-size: 1rem;
    color: var(--c-navy);
  }
  .op-wf-desc {
    display: block;
    font-size: 0.85rem;
    color: var(--c-slate-500);
    line-height: 1.4;
  }
}

/* Responsive Text Utilities */
@media (max-width: 900px) {
  .hide-on-mobile {
    display: none !important;
  }
  .text-center-mobile {
    text-align: center !important;
  }
}
@media (min-width: 901px) {
  .show-on-mobile {
    display: none !important;
  }
  .text-center-mobile {
    text-align: left;
  }
}
