/**
 * Engineering Interface CSS
 * Orange/cyan cyberpunk maintenance aesthetic
 */

.engineering-container {
  padding: 20px;
  background: #050505;
  height: 100%;
  overflow-y: auto;
  font-family: "Courier New", monospace;
}

.section-panel {
  border: 1px solid #333;
  background: #0a0a0a;
  padding: 20px;
  margin-bottom: 20px;
}

.section-header {
  color: #ff9900; /* Engineering Orange */
  border-bottom: 1px solid #ff9900;
  padding-bottom: 10px;
  margin-bottom: 20px;
  letter-spacing: 1px;
  font-size: 1.1rem;
}

.medical-header {
  color: #00ffff; /* Medical Cyan */
  border-bottom-color: #00ffff;
}

/* HULL SECTION */
.diagnostic-row {
  display: flex;
  gap: 30px;
  align-items: center;
}

.schematic-view {
  flex-shrink: 0;
}

.ship-silhouette {
  width: 100px;
  height: 100px;
  border: 2px dashed #444;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all 0.3s;
}

.ship-silhouette.stable {
  border-color: #0f0;
  box-shadow: 0 0 10px rgba(0, 255, 0, 0.3);
}

.ship-silhouette.warning {
  border-color: #ff9900;
  box-shadow: 0 0 10px rgba(255, 153, 0, 0.3);
}

.ship-silhouette.critical {
  border-color: #f00;
  box-shadow: 0 0 20px rgba(255, 0, 0, 0.5);
  animation: blink 0.5s infinite;
}

@keyframes blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.hull-pct {
  font-size: 1.5rem;
  font-weight: bold;
  color: #fff;
}

.repair-controls {
  flex-grow: 1;
}

.damage-report {
  color: #fff;
  font-size: 1.1rem;
  margin-bottom: 15px;
}

.blink-red {
  color: #f00;
  animation: blink 0.5s infinite;
  font-weight: bold;
}

.warning-text {
  color: #ff9900;
  font-weight: bold;
}

.ok {
  color: #0f0;
  font-weight: bold;
}

.repair-actions {
  margin-top: 15px;
}

.cost-preview {
  color: #888;
  margin-bottom: 5px;
  font-size: 0.9rem;
}

.credit-balance {
  color: #0f0;
  margin-bottom: 10px;
  font-size: 0.9rem;
}

.error-msg {
  color: #f00;
  font-size: 0.85rem;
  margin-top: 5px;
}

.all-clear {
  color: #0f0;
  font-size: 1rem;
  font-weight: bold;
  padding: 10px;
  background: rgba(0, 255, 0, 0.1);
  border: 1px solid #0f0;
}

/* CREW SECTION */
.header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.inventory-count {
  color: #00ffff;
  font-weight: bold;
  font-size: 0.9rem;
}

.crew-cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 15px;
}

@media (min-width: 768px) {
  .crew-cards-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.bio-card {
  border: 1px solid #004444;
  padding: 15px;
  background: #001111;
}

.bio-header {
  display: flex;
  justify-content: space-between;
  color: #00ffff;
  font-weight: bold;
  margin-bottom: 10px;
  font-size: 0.9rem;
}

.name {
  font-size: 1rem;
}

.role {
  font-size: 0.85rem;
  opacity: 0.8;
}

/* EKG LINE ANIMATION */
.vitals-display {
  margin-bottom: 15px;
}

.vitals-display label {
  color: #00ffff;
  font-size: 0.8rem;
  display: block;
  margin-bottom: 5px;
}

.ekg-line {
  height: 3px;
  background: #00ffff;
  width: 100%;
  margin-bottom: 15px;
  position: relative;
  overflow: hidden;
}

.ekg-line.normal::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, #fff, transparent);
  transform: translateX(-100%);
  animation: ekgSwipe 2s infinite linear;
}

.ekg-line.flatline {
  background: #f00;
  animation: flatline 1s infinite;
}

@keyframes ekgSwipe {
  100% {
    transform: translateX(100%);
  }
}

@keyframes flatline {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.3;
  }
}

/* HP/MORALE BARS */
.hp-readout,
.morale-readout {
  margin-bottom: 10px;
}

.hp-readout label,
.morale-readout label {
  color: #00ffff;
  font-size: 0.8rem;
  display: block;
  margin-bottom: 5px;
}

.bar-track {
  width: 100%;
  height: 20px;
  background: #001111;
  border: 1px solid #004444;
  position: relative;
  margin-bottom: 5px;
}

.bar-fill {
  height: 100%;
  transition: width 0.3s;
}

.bar-fill.red {
  background: #f00;
}

.bar-fill.yellow {
  background: #ff9900;
}

.bar-fill.green {
  background: #0f0;
}

.bar-fill.morale {
  background: #00ffff;
}

.hp-readout span,
.morale-readout span {
  color: #fff;
  font-size: 0.85rem;
  font-weight: bold;
}

/* ACTION BUTTONS */
.action-btn {
  width: 100%;
  padding: 10px;
  border: none;
  font-weight: bold;
  cursor: pointer;
  text-transform: uppercase;
  margin-top: 10px;
  transition: all 0.2s;
  font-family: "Courier New", monospace;
}

.repair-btn {
  background: #ff9900;
  color: #000;
}

.repair-btn:hover {
  background: #fff;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.repair-btn:disabled {
  background: #333;
  color: #666;
  cursor: not-allowed;
}

.med-btn {
  background: transparent;
  border: 1px solid #00ffff;
  color: #00ffff;
}

.med-btn:hover:not(:disabled) {
  background: #00ffff;
  color: #000;
}

.med-btn:disabled {
  border-color: #333;
  color: #333;
  cursor: not-allowed;
}
