/* =============================================================================
   MULTRON CONVENTIONAL FIRE ALARM CONTROL PANEL (MC-8 SERIES) FASCIA STYLES
   Designed in compliance with EN 54 Parts 2 & 4
   Features:
   - Deep Fire-Red Textured Cabinet Enclosure
   - Dual 4-Zone Annunciator Modules (Zones 1-4 and 5-8) with Fire, Fault & Disable
   - Main Control Module with EN54 Access Key Switch, 12-LED Status Column,
     Master Fire & Fault Annunciators, and Ergonomic Tactile Pushbuttons
   ============================================================================= */

/* Main Cabinet Container */
.mc8-cabinet {
  max-width: 1040px;
  margin: 0 auto 24px auto;
  background: radial-gradient(circle at 50% 20%, #a81c1c 0%, #881313 60%, #680d0d 100%);
  border: 4px solid #4a0808;
  border-radius: 12px;
  box-shadow: 
    0 16px 36px rgba(0, 0, 0, 0.65),
    inset 0 1px 2px rgba(255, 255, 255, 0.25),
    inset 0 -3px 6px rgba(0, 0, 0, 0.5);
  padding: 24px 28px;
  position: relative;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  user-select: none;
  box-sizing: border-box;
}

/* Subtle metallic texture */
.mc8-cabinet::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 8px;
  background-image: radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 8px 8px;
  pointer-events: none;
  opacity: 0.6;
}

/* Header Brand Badge */
.mc8-cabinet-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid rgba(0, 0, 0, 0.35);
}

.mc8-brand-badge {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mc8-brand-logo {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 2.5px;
  color: #ffffff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.7);
  background: #1e3a8a;
  padding: 4px 14px;
  border-radius: 4px;
  border: 1px solid #3b82f6;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.mc8-brand-model {
  font-size: 13px;
  font-weight: 700;
  color: #fecdd3;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.mc8-en54-badge {
  font-size: 11px;
  font-weight: 700;
  color: #f1f5f9;
  background: rgba(0, 0, 0, 0.4);
  padding: 4px 10px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  letter-spacing: 0.5px;
}

/* Module Outer Frame (Bezel) */
.mc8-module-frame {
  background: #1e293b;
  border: 3px solid #0f172a;
  border-radius: 8px;
  box-shadow: 
    0 8px 18px rgba(0, 0, 0, 0.5),
    inset 0 1px 1px rgba(255, 255, 255, 0.2),
    inset 0 -2px 4px rgba(0, 0, 0, 0.8);
  padding: 4px;
  box-sizing: border-box;
}

.mc8-module-inner {
  background: linear-gradient(180deg, #1d4ed8 0%, #1e40af 60%, #172554 100%);
  border: 1px solid #3b82f6;
  border-radius: 5px;
  padding: 14px 16px;
  position: relative;
  box-sizing: border-box;
}

/* TOP DECK: Dual 4-Zone Modules */
.mc8-upper-deck {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

/* Zone Table Layout */
.mc8-zone-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 7px;
}

.mc8-zone-table th {
  font-size: 11px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
  padding: 0 4px 4px 4px;
}

.mc8-col-fire { width: 50px; text-align: center; }
.mc8-col-fault { width: 54px; text-align: center; }
.mc8-col-name { text-align: left; padding-left: 8px !important; }
.mc8-col-disable { width: 68px; text-align: center; }

.mc8-zone-row {
  background: rgba(15, 23, 42, 0.25);
  border-radius: 4px;
}

/* Square LED Bezels */
.mc8-led-box {
  width: 24px;
  height: 24px;
  margin: 0 auto;
  background: #0f172a;
  border: 1.5px solid #334155;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.8);
}

/* Zone Fire LED (Red Square) */
.mc8-led-fire {
  width: 12px;
  height: 12px;
  background: #450a0a;
  border: 1px solid #7f1d1d;
  border-radius: 2px;
  transition: all 0.15s ease;
}

.mc8-led-fire.active {
  background: #ef4444;
  border-color: #f87171;
  box-shadow: 0 0 12px #ef4444, inset 0 0 4px #fee2e2;
  animation: mc8-fire-pulse 0.7s infinite alternate;
}

@keyframes mc8-fire-pulse {
  0% { transform: scale(0.96); filter: brightness(0.9); }
  100% { transform: scale(1.04); filter: brightness(1.3); }
}

/* Zone Fault LED (Yellow Square) */
.mc8-led-fault {
  width: 12px;
  height: 12px;
  background: #422006;
  border: 1px solid #713f12;
  border-radius: 2px;
  transition: all 0.15s ease;
}

.mc8-led-fault.active {
  background: #eab308;
  border-color: #fde047;
  box-shadow: 0 0 10px #eab308, inset 0 0 3px #fef08a;
  animation: mc8-fault-pulse 1s infinite alternate;
}

@keyframes mc8-fault-pulse {
  0% { opacity: 0.75; }
  100% { opacity: 1; }
}

/* Zone Card Insert (White rectangle) */
.mc8-zone-card {
  background: #ffffff;
  color: #0f172a;
  border-radius: 3px;
  padding: 4px 8px;
  box-shadow: 
    0 1px 3px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-left: 3px solid #3b82f6;
}

.mc8-zone-card-title {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: #1e293b;
  line-height: 1.1;
}

.mc8-zone-card-sub {
  font-size: 9px;
  font-weight: 600;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}

/* Zone Disable Button (Yellow square with micro dot LED) */
.mc8-btn-disable {
  width: 32px;
  height: 24px;
  margin: 0 auto;
  background: linear-gradient(180deg, #fef08a 0%, #eab308 60%, #ca8a04 100%);
  border: 1.5px solid #854d0e;
  border-radius: 3px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: 
    0 2px 4px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
  transition: all 0.1s ease;
  outline: none;
  padding: 0;
}

.mc8-btn-disable:hover {
  filter: brightness(1.08);
}

.mc8-btn-disable:active {
  transform: translateY(1px);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

/* Micro LED dot inside disable button */
.mc8-btn-disable-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #713f12;
  border: 1px solid #451a03;
  transition: all 0.15s ease;
}

.mc8-btn-disable.active {
  background: linear-gradient(180deg, #fde047 0%, #ca8a04 100%);
  border-color: #713f12;
}

.mc8-btn-disable.active .mc8-btn-disable-dot {
  background: #ffffff;
  border-color: #fde047;
  box-shadow: 0 0 6px #ffffff, 0 0 10px #eab308;
}

/* =============================================================================
   LOWER DECK: MAIN CONTROL MODULE
   Left: EN54 text & Key Switch
   Center: 12-LED Status Column
   Right: Controls & Master Annunciators
   ============================================================================= */
.mc8-lower-deck {
  display: grid;
  grid-template-columns: 240px 1fr 340px;
  gap: 20px;
  align-items: start;
}

/* LEFT: Compliance Text & Access Key Switch */
.mc8-access-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.mc8-compliance-text {
  font-size: 10px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  line-height: 1.4;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

/* Key Switch Enclosure Box */
.mc8-keyswitch-box {
  background: rgba(15, 23, 42, 0.35);
  border: 1.5px solid #60a5fa;
  border-radius: 6px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4);
}

.mc8-keyswitch-header {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: #ffffff;
  text-transform: uppercase;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Rotary Lock Barrel & Icons */
.mc8-keyswitch-stage {
  width: 90px;
  height: 90px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mc8-lock-icon-locked {
  position: absolute;
  top: 2px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 14px;
  color: #ffffff;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.8));
}

.mc8-lock-icon-unlocked {
  position: absolute;
  right: 2px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  color: #ffffff;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.8));
}

/* Lock Barrel */
.mc8-lock-barrel {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: radial-gradient(circle, #cbd5e1 0%, #64748b 70%, #334155 100%);
  border: 3px solid #1e293b;
  box-shadow: 
    0 4px 8px rgba(0, 0, 0, 0.6),
    inset 0 2px 3px rgba(255, 255, 255, 0.6);
  position: relative;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s ease;
}

.mc8-lock-barrel:hover {
  filter: brightness(1.1);
}

/* Rotating Key Slot */
.mc8-key-slot {
  width: 24px;
  height: 5px;
  background: #0f172a;
  border-radius: 2px;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.9);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform: rotate(0deg); /* 0deg = Vertical Locked, 90deg = Horizontal Unlocked */
}

.mc8-lock-barrel.unlocked .mc8-key-slot {
  transform: rotate(90deg);
}

.mc8-keyswitch-status {
  font-size: 9px;
  font-weight: 700;
  color: #93c5fd;
  margin-top: 8px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* CENTER: 12-LED Vertical Status Column */
.mc8-status-col {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 4px 10px;
}

.mc8-status-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Round Status Micro LED */
.mc8-dot-led {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #334155;
  border: 1px solid #1e293b;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.8);
  flex-shrink: 0;
  transition: all 0.15s ease;
}

/* LED Color Modes */
.mc8-dot-led.green.active {
  background: #22c55e;
  border-color: #86efac;
  box-shadow: 0 0 8px #22c55e, inset 0 0 2px #dcfce7;
}

.mc8-dot-led.yellow.active {
  background: #eab308;
  border-color: #fde047;
  box-shadow: 0 0 8px #eab308, inset 0 0 2px #fef08a;
}

.mc8-dot-led.red.active {
  background: #ef4444;
  border-color: #fca5a5;
  box-shadow: 0 0 8px #ef4444, inset 0 0 2px #fee2e2;
}

.mc8-status-label {
  font-size: 10px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

/* RIGHT: Controls & Master Banners */
.mc8-controls-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* Master Annunciator Cards (FIRE & FAULT) */
.mc8-master-banner {
  border-radius: 6px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 
    0 3px 6px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  border: 2px solid rgba(0, 0, 0, 0.4);
}

.mc8-master-banner.fire {
  background: linear-gradient(180deg, #dc2626 0%, #b91c1c 60%, #991b1b 100%);
  border-color: #f87171;
}

.mc8-master-banner.fire.active {
  background: linear-gradient(180deg, #ef4444 0%, #dc2626 100%);
  box-shadow: 0 0 18px #ef4444, inset 0 0 6px #fee2e2;
  animation: mc8-master-fire-pulse 0.6s infinite alternate;
}

@keyframes mc8-master-fire-pulse {
  0% { filter: brightness(0.95); }
  100% { filter: brightness(1.25); }
}

.mc8-master-banner.fault {
  background: linear-gradient(180deg, #fef08a 0%, #eab308 60%, #ca8a04 100%);
  border-color: #fde047;
}

.mc8-master-banner.fault.active {
  box-shadow: 0 0 14px #eab308, inset 0 0 4px #ffffff;
}

.mc8-banner-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mc8-banner-title {
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.mc8-master-banner.fire .mc8-banner-title {
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.mc8-master-banner.fault .mc8-banner-title {
  color: #422006;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4);
}

.mc8-banner-icon {
  font-size: 16px;
}

/* Tactile Pushbuttons with Dual Graphic Block */
.mc8-btn-card {
  background: #0f172a;
  border: 1.5px solid #334155;
  border-radius: 6px;
  padding: 4px 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.4);
  transition: all 0.1s ease;
  outline: none;
  height: 40px;
  box-sizing: border-box;
}

.mc8-btn-card:hover {
  border-color: #60a5fa;
  transform: translateY(-1px);
}

.mc8-btn-card:active {
  transform: translateY(1px);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.mc8-btn-text-side {
  display: flex;
  align-items: center;
  gap: 6px;
}

.mc8-btn-text-side .mc8-dot-led {
  margin-right: 2px;
}

.mc8-btn-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.6px;
  color: #ffffff;
  text-transform: uppercase;
  text-align: left;
  line-height: 1.1;
}

/* Graphic Icon Box inside Button */
.mc8-btn-icon-box {
  width: 28px;
  height: 28px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.mc8-icon-red {
  background: linear-gradient(180deg, #ef4444 0%, #dc2626 100%);
  color: #ffffff;
  border: 1px solid #b91c1c;
}

.mc8-icon-yellow {
  background: linear-gradient(180deg, #fef08a 0%, #eab308 100%);
  color: #713f12;
  border: 1px solid #a16207;
}

.mc8-icon-green {
  background: linear-gradient(180deg, #4ade80 0%, #22c55e 100%);
  color: #064e3b;
  border: 1px solid #15803d;
}

.mc8-icon-dark {
  background: linear-gradient(180deg, #334155 0%, #1e293b 100%);
  color: #f1f5f9;
  border: 1px solid #475569;
}
