/* ==========================================================================
   ZITON ZP3 FIRE ALARM SYSTEM FASCIA STYLES
   Pixel-accurate rendition of the Ziton ZP3 Intelligent Addressable FACP
   ========================================================================== */

:root {
  --zp3-header-bg: #889098;
  --zp3-upper-bg: #35669e;
  --zp3-lower-bg: #8c939b;
  --zp3-module-bg: #162c4a;
  --zp3-module-border: rgba(255, 255, 255, 0.75);
  --zp3-lcd-bg: #a1b822;
  --zp3-lcd-text: #142202;
  
  --zp3-btn-blue: #2563eb;
  --zp3-btn-border: #0a1f3d;
  
  --zp3-led-off: #201313;
  --zp3-led-off-yellow: #262108;
  --zp3-led-off-green: #07200e;
  
  --zp3-led-red: #ef4444;
  --zp3-led-yellow: #f59e0b;
  --zp3-led-green: #22c55e;
}

/* Cabinet Housing */
.zp3-cabinet {
  position: relative;
  width: 1000px;
  max-width: 100%;
  margin: 0 auto;
  background: var(--zp3-lower-bg);
  border: 3px solid #1a1e21;
  border-radius: 4px;
  box-shadow: 
    0 16px 40px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
  box-sizing: border-box;
  user-select: none;
  font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
  overflow: hidden;
}

/* -------------------------------------------------------------
   1. TOP GREY HEADER BAR
   ------------------------------------------------------------- */
.zp3-header-strip {
  background: var(--zp3-header-bg);
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid #1f2529;
  position: relative;
}

.zp3-header-title {
  font-size: 14px;
  font-weight: 900;
  color: #111827;
  letter-spacing: 0.5px;
}

.zp3-yellow-badge {
  background: #ffea38;
  color: #000000;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.8px;
  padding: 4px 16px;
  border-radius: 3px;
  border: 1px solid #d4b800;
  box-shadow: 0 1px 2px rgba(0,0,0,0.25);
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

/* -------------------------------------------------------------
   2. UPPER BLUE CONTROL DECK
   ------------------------------------------------------------- */
.zp3-upper-deck {
  background: var(--zp3-upper-bg);
  padding: 16px 20px;
  display: grid;
  grid-template-columns: 285px 1fr;
  gap: 16px;
  border-bottom: 3px solid #1c2630;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Left Module: 50 LOCAL ZONES Annunciator */
.zp3-zones-module {
  background: var(--zp3-module-bg);
  border: 1.5px solid var(--zp3-module-border);
  border-radius: 10px;
  padding: 14px 12px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.5);
}

.zp3-module-header {
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-align: center;
  margin-bottom: 12px;
  text-transform: uppercase;
}

.zp3-zones-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  column-gap: 6px;
  row-gap: 8px;
  align-items: center;
  justify-items: center;
}

.zp3-zone-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.zp3-zone-led {
  width: 14px;
  height: 9px;
  background: var(--zp3-led-off);
  border: 1px solid #0a0a0a;
  border-radius: 1.5px;
  box-shadow: inset 0 1px 1px rgba(0,0,0,0.6);
  transition: all 0.15s ease;
}

.zp3-zone-led.active {
  background: var(--zp3-led-red);
  box-shadow: 
    0 0 8px #ff4d4d,
    inset 0 1px 2px #ffcaca;
  animation: zp3-pulse-red 0.8s infinite alternate;
}

.zp3-zone-num {
  font-size: 8px;
  font-weight: 700;
  color: #cbd5e1;
}

/* Right Main Control & Display Deck */
.zp3-control-deck {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Row A: Top Navigation & LCD */
.zp3-top-lcd-row {
  background: var(--zp3-module-bg);
  border: 1.5px solid var(--zp3-module-border);
  border-radius: 10px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-sizing: border-box;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.5);
}

.zp3-lcd-left-btns {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.zp3-btn-with-label {
  display: flex;
  align-items: center;
  gap: 6px;
}

.zp3-label-text {
  font-size: 8px;
  font-weight: 900;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: -0.2px;
  line-height: 1.1;
}

/* Authentic ZP3 Blue Pushbuttons */
.zp3-btn {
  background: linear-gradient(180deg, #3b82f6 0%, #1e40af 100%);
  border: 1.5px solid #0f172a;
  border-radius: 3px;
  box-shadow: 
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    0 1px 2px rgba(0,0,0,0.3);
  color: #ffffff;
  cursor: pointer;
  padding: 0;
  transition: all 0.08s ease;
  flex-shrink: 0;
}

.zp3-btn:hover {
  background: linear-gradient(180deg, #60a5fa 0%, #2563eb 100%);
}

.zp3-btn:active {
  transform: translateY(1px);
  background: #1e3a8a;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.5);
}

.zp3-btn.size-sm {
  width: 32px;
  height: 18px;
}

.zp3-btn.size-md {
  width: 38px;
  height: 20px;
}

/* Center LCD Display */
.zp3-lcd-frame {
  flex: 1;
  background: #111827;
  border: 2px solid #000000;
  border-radius: 4px;
  padding: 4px;
  box-shadow: inset 0 0 6px rgba(0,0,0,0.8);
}

.zp3-lcd-screen {
  background: var(--zp3-lcd-bg);
  background-image: 
    linear-gradient(rgba(0, 0, 0, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.04) 1px, transparent 1px);
  background-size: 3px 3px;
  border: 1px solid #283606;
  height: 64px;
  padding: 6px 10px;
  box-sizing: border-box;
  font-family: "Lucida Console", "Courier New", monospace;
  font-size: 11px;
  font-weight: 700;
  color: var(--zp3-lcd-text);
  line-height: 1.28;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: inset 0 0 10px rgba(32, 48, 6, 0.45);
  position: relative;
  overflow: hidden;
}

.zp3-lcd-line {
  white-space: pre;
}

/* Right Scroll Buttons */
.zp3-lcd-right-btns {
  display: flex;
  align-items: center;
  gap: 8px;
}

.zp3-scroll-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.zp3-scroll-col .zp3-btn {
  font-size: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 18px;
}

.zp3-more-label {
  font-size: 7.5px;
  font-weight: 900;
  color: #ffffff;
}

/* Row B: Middle Command Action Pushbuttons */
.zp3-mid-btns-row {
  background: var(--zp3-module-bg);
  border: 1.5px solid var(--zp3-module-border);
  border-radius: 10px;
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.5);
}

.zp3-cmd-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.zp3-cmd-label {
  font-size: 7.5px;
  font-weight: 900;
  color: #ffffff;
  text-transform: uppercase;
  text-align: center;
  line-height: 1.1;
  min-height: 18px;
  display: flex;
  align-items: flex-end;
}

/* Status Indicator LED above middle command buttons */
.zp3-cmd-led {
  width: 20px;
  height: 10px;
  background: #2a1111;
  border: 1px solid #000;
  border-radius: 1.5px;
  box-shadow: inset 0 1px 1px rgba(0,0,0,0.5);
  transition: all 0.15s ease;
}

.zp3-cmd-led.red {
  background: #361010;
}
.zp3-cmd-led.red.active {
  background: var(--zp3-led-red);
  box-shadow: 0 0 8px #ff4444, inset 0 1px 2px #ffcaca;
  animation: zp3-pulse-red 0.8s infinite alternate;
}

.zp3-cmd-led.yellow {
  background: #362908;
}
.zp3-cmd-led.yellow.active {
  background: var(--zp3-led-yellow);
  box-shadow: 0 0 8px #facc15, inset 0 1px 2px #fef08a;
  animation: zp3-pulse-yellow 1.2s infinite alternate;
}

/* Row C: System Status Matrix & Controls */
.zp3-bottom-row {
  background: var(--zp3-module-bg);
  border: 1.5px solid var(--zp3-module-border);
  border-radius: 10px;
  padding: 10px 14px;
  display: grid;
  grid-template-columns: 85px 1fr 130px;
  gap: 10px;
  align-items: center;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.5);
}

/* Day/Night Module */
.zp3-day-night-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-right: 1px solid rgba(255,255,255,0.2);
  padding-right: 6px;
}

.zp3-day-night-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.zp3-matrix-led {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 1px solid #000000;
  background: #28220a;
  box-shadow: inset 0 1px 1px rgba(0,0,0,0.6);
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.zp3-matrix-led.square {
  border-radius: 2px;
  width: 8px;
  height: 8px;
}

.zp3-matrix-led.yellow.active {
  background: var(--zp3-led-yellow);
  box-shadow: 0 0 6px #facc15, inset 0 1px 1px #fef08a;
}

.zp3-matrix-led.red.active {
  background: var(--zp3-led-red);
  box-shadow: 0 0 6px #ef4444, inset 0 1px 1px #fecaca;
}

.zp3-matrix-led.green.active {
  background: var(--zp3-led-green);
  box-shadow: 0 0 6px #22c55e, inset 0 1px 1px #bbf7d0;
}

/* System Status Table */
.zp3-status-table {
  width: 100%;
  border-collapse: collapse;
}

.zp3-status-table th,
.zp3-status-table td {
  border: 1px solid #334e68;
  padding: 2px 4px;
  font-size: 7.5px;
  font-weight: 800;
  color: #ffffff;
  text-align: center;
  height: 14px;
  line-height: 1;
}

.zp3-status-table th {
  background: rgba(255, 255, 255, 0.1);
  text-transform: uppercase;
}

.zp3-status-table td.header-cell {
  background: rgba(255, 255, 255, 0.05);
  text-align: left;
  font-size: 7px;
  padding-left: 4px;
}

.zp3-status-table td.power-cell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 4px;
}

/* Right Key Switch & Restore Controls */
.zp3-right-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.zp3-restore-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.zp3-restore-label {
  font-size: 7px;
  font-weight: 900;
  color: #ffffff;
  text-align: center;
  text-transform: uppercase;
  line-height: 1.05;
}

/* Rotary Control Key Switch */
.zp3-keyswitch-box {
  background: #111827;
  border: 1.5px solid #000;
  border-radius: 4px;
  padding: 4px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.zp3-keyswitch-label {
  font-size: 6.5px;
  font-weight: 900;
  color: #cbd5e1;
  text-transform: uppercase;
}

.zp3-rotary-dial {
  width: 28px;
  height: 28px;
  background: radial-gradient(circle, #4b5563 0%, #1f2937 80%, #111827 100%);
  border: 1.5px solid #000;
  border-radius: 50%;
  position: relative;
  box-shadow: inset 0 1px 2px rgba(255,255,255,0.4), 0 2px 4px rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.zp3-rotary-slot {
  width: 3.5px;
  height: 16px;
  background: #000;
  border-radius: 1px;
  position: relative;
}

.zp3-rotary-slot::after {
  content: '';
  position: absolute;
  top: 1px;
  left: 1px;
  width: 1.5px;
  height: 14px;
  background: #71717a;
}

.zp3-keyswitch-box.on .zp3-rotary-dial {
  transform: rotate(0deg);
}

.zp3-keyswitch-box.off .zp3-rotary-dial {
  transform: rotate(-45deg);
}

.zp3-switch-pos-text {
  font-size: 6.5px;
  font-weight: 900;
  color: #94a3b8;
  display: flex;
  justify-content: space-between;
  width: 100%;
}

.zp3-switch-pos-text .active {
  color: #38bdf8;
}

/* -------------------------------------------------------------
   3. LOWER GREY DECK (PRINTER, KEYPAD, MASTER KEY)
   ------------------------------------------------------------- */
.zp3-lower-deck {
  background: var(--zp3-lower-bg);
  padding: 24px 28px;
  display: grid;
  grid-template-columns: 320px 1fr 100px;
  gap: 24px;
  align-items: center;
}

/* Built-in Thermal Strip Printer */
.zp3-printer-housing {
  background: #626a72;
  border: 2px solid #282f34;
  border-radius: 4px;
  padding: 12px;
  box-shadow: 
    0 4px 10px rgba(0,0,0,0.3),
    inset 0 1px 0 rgba(255,255,255,0.3);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.zp3-printer-grill {
  display: flex;
  gap: 6px;
  margin-bottom: 4px;
}

.zp3-printer-bar {
  width: 6px;
  height: 36px;
  background: #2b3034;
  border-radius: 1px;
  border: 1px solid #1a1e21;
}

.zp3-printer-slot-bezel {
  background: #41474d;
  border: 1.5px solid #202428;
  border-radius: 3px;
  padding: 6px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.zp3-printer-slot {
  width: 100%;
  height: 6px;
  background: #000;
  border-radius: 1px;
  margin-bottom: 2px;
}

.zp3-printer-paper {
  background: #fff;
  border: 1px solid #cbd5e1;
  border-top: none;
  width: 90%;
  min-height: 24px;
  max-height: 70px;
  overflow-y: auto;
  padding: 4px 6px;
  font-family: monospace;
  font-size: 8px;
  color: #111;
  line-height: 1.2;
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

/* Tactile 4x5 Keypad Module */
.zp3-keypad-housing {
  background: #1e3d64;
  border: 2px solid #000000;
  border-radius: 4px;
  padding: 10px 14px;
  box-shadow: 
    0 4px 10px rgba(0,0,0,0.3),
    inset 0 1px 0 rgba(255,255,255,0.4);
  justify-self: center;
}

.zp3-keypad-grid {
  display: grid;
  grid-template-columns: repeat(5, 42px);
  gap: 8px;
}

.zp3-keypad-key {
  height: 34px;
  background: linear-gradient(180deg, #3b82f6 0%, #1d4ed8 100%);
  border: 1.5px solid #0a1727;
  border-radius: 4px;
  box-shadow: 
    inset 0 1px 0 rgba(255, 255, 255, 0.45),
    0 2px 3px rgba(0,0,0,0.25);
  color: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-sizing: border-box;
  transition: all 0.08s ease;
  padding: 0;
}

.zp3-keypad-key:hover {
  background: linear-gradient(180deg, #60a5fa 0%, #2563eb 100%);
}

.zp3-keypad-key:active {
  transform: translateY(1.5px);
  background: #1e3a8a;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.4);
}

.zp3-key-num {
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
}

.zp3-key-alpha {
  font-size: 7px;
  font-weight: 800;
  opacity: 0.85;
  line-height: 1;
  margin-top: 1px;
}

.zp3-key-icon {
  font-size: 13px;
  line-height: 1;
}

/* Master Cabinet Key & Lock Cylinder */
.zp3-master-lock {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-self: end;
  position: relative;
}

.zp3-lock-cylinder {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #e2e8f0 0%, #94a3b8 50%, #64748b 100%);
  border: 2px solid #1e293b;
  border-radius: 6px;
  box-shadow: 
    0 4px 6px rgba(0,0,0,0.3),
    inset 0 1px 0 #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.zp3-lock-inner-circle {
  width: 26px;
  height: 26px;
  background: radial-gradient(circle, #cbd5e1 0%, #64748b 100%);
  border: 1.5px solid #1e293b;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.zp3-hanging-key {
  position: absolute;
  top: 16px;
  left: 14px;
  cursor: pointer;
  transition: transform 0.2s ease;
  filter: drop-shadow(0 4px 4px rgba(0,0,0,0.4));
}

.zp3-hanging-key:hover {
  transform: rotate(5deg) scale(1.05);
}

/* -------------------------------------------------------------
   4. ZITON SCREENSAVER VIEW
   ------------------------------------------------------------- */
.zp3-screensaver-view {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--zp3-lcd-bg);
  background-image: 
    linear-gradient(rgba(0, 0, 0, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.04) 1px, transparent 1px);
  background-size: 3px 3px;
  box-sizing: border-box;
  padding: 4px 8px;
  cursor: pointer;
  animation: zp3-fade 0.35s ease-out;
}

.zp3-screensaver-title {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.8px;
  color: var(--zp3-lcd-text);
}

.zp3-screensaver-time {
  font-size: 10px;
  font-weight: 800;
  color: var(--zp3-lcd-text);
  margin-top: 2px;
}

.zp3-screensaver-sub {
  font-size: 8px;
  font-weight: 700;
  color: #2b3f07;
  margin-top: 2px;
}

@keyframes zp3-pulse-red {
  0% { filter: brightness(0.9); }
  100% { filter: brightness(1.25); }
}

@keyframes zp3-pulse-yellow {
  0% { filter: brightness(0.85); }
  100% { filter: brightness(1.2); }
}

@keyframes zp3-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}
