/* ==========================================================================
   NOTIFIER NFS2-3030 FASCIA STYLES
   Pixel-accurate rendition of the Notifier NFS2-3030 Fire Alarm Control Panel
   Resized and proportioned strictly per official fascia reference image (1000px x 670px)
   ========================================================================== */

:root {
  --nfs-bg: #ffffff;
  --nfs-border: #000000;
  --nfs-key-bg: #ffffff;
  --nfs-key-border: #000000;
  --nfs-key-text: #000000;
  --nfs-red-btn: #dc2626;
  --nfs-red-btn-border: #000000;
  
  /* Authentic Retro 640-Character Liquid Crystal Display (LCD-160) */
  --nfs-lcd-bg: #98be22;
  --nfs-lcd-text: #152403;
  --nfs-lcd-pixel-shadow: rgba(21, 36, 3, 0.25);
}

/* NFS2-3030 Cabinet Wrapper (Exact 1000px x 670px proportions matching reference diagram) */
.nfs3030-cabinet {
  position: relative;
  width: 1000px;
  height: 670px;
  max-width: 100%;
  margin: 0 auto;
  background: #ffffff;
  /* Authentic industrial double black border */
  border: 2px solid #000000;
  border-radius: 8px;
  box-shadow: 
    inset 0 0 0 2.5px #ffffff,
    inset 0 0 0 4px #000000,
    0 12px 36px rgba(0, 0, 0, 0.4);
  padding: 22px 22px 22px 22px;
  box-sizing: border-box;
  user-select: none;
  font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Upper Deck: Left LEDs | Center LCD with Side Softkeys | Right Red Action Keys */
.nfs3030-upper-deck {
  display: grid;
  grid-template-columns: 125px 1fr 185px;
  gap: 14px;
  align-items: stretch;
  height: 380px;
  box-sizing: border-box;
}

/* -------------------------------------------------------------
   LEFT: Status LED Column (10 Status LEDs)
   ------------------------------------------------------------- */
.nfs-led-column {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 30px 0 4px 4px;
  box-sizing: border-box;
  height: 100%;
}

.nfs-led-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

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

/* Rectangular Status LEDs with industrial slotted bezel [0] */
.nfs-led-rect {
  width: 14px;
  height: 19px;
  border: 1.5px solid #000000;
  border-radius: 2px;
  background: #2b3033;
  box-shadow: 
    inset 0 0 0 1px rgba(255, 255, 255, 0.3),
    inset 0 1px 3px rgba(0,0,0,0.6);
  flex-shrink: 0;
  position: relative;
  transition: all 0.15s ease-in-out;
}

.nfs-led-rect::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 2px;
  width: 6px;
  height: 3px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 1px;
}

/* LED Color Modes */
.nfs-led-rect.green {
  background: #0d2e15;
}
.nfs-led-rect.green.active {
  background: #16a34a;
  box-shadow: 0 0 8px #22c55e, inset 0 1px 2px #bbf7d0;
}

.nfs-led-rect.red {
  background: #3b1010;
}
.nfs-led-rect.red.active {
  background: #dc2626;
  box-shadow: 0 0 10px #ef4444, inset 0 1px 2px #fecaca;
  animation: nfs-pulse-red 0.8s infinite alternate;
}

.nfs-led-rect.yellow {
  background: #362e0c;
}
.nfs-led-rect.yellow.active {
  background: #eab308;
  box-shadow: 0 0 8px #facc15, inset 0 1px 2px #fef08a;
  animation: nfs-pulse-yellow 1.2s infinite alternate;
}

.nfs-led-rect.blue {
  background: #0c2136;
}
.nfs-led-rect.blue.active {
  background: #2563eb;
  box-shadow: 0 0 8px #3b82f6;
}

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

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

/* -------------------------------------------------------------
   CENTER: LCD-160 Liquid Crystal Display with Softkeys
   ------------------------------------------------------------- */
.nfs-lcd-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  position: relative;
  height: 100%;
  box-sizing: border-box;
}

/* Softkey Columns (Left & Right of LCD) */
.nfs-softkey-col {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  padding-bottom: 4px;
  box-sizing: border-box;
}

.nfs-softkey-col.left {
  align-items: flex-end;
}

.nfs-softkey-col.right {
  align-items: flex-start;
  padding-top: 54px;
}

/* Controls Active Indicator Box directly above left softkeys */
.nfs-controls-active-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 10px;
}

.nfs-controls-label {
  font-size: 7.5px;
  font-weight: 900;
  color: #000000;
  letter-spacing: -0.2px;
  text-align: center;
  line-height: 1.1;
  margin-bottom: 3px;
  text-transform: uppercase;
}

/* Softkey Item with Button & Triangle Pointer */
.nfs-softkey-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nfs-softkey-arrow {
  font-size: 14px;
  font-weight: 900;
  color: #000000;
  line-height: 1;
  flex-shrink: 0;
  user-select: none;
}

/* Rounded Square Softkey Buttons with double black border */
.nfs-softkey-btn {
  width: 33px;
  height: 31px;
  background: #ffffff;
  border: 1.5px solid #000000;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 
    inset 0 0 0 1px #ffffff,
    inset 0 0 0 2.2px #000000,
    0 1px 2px rgba(0,0,0,0.15);
  box-sizing: border-box;
  transition: all 0.08s ease;
  padding: 0;
}

.nfs-softkey-btn:hover {
  background: #f4f5f6;
}

.nfs-softkey-btn:active {
  transform: translateY(1px);
  background: #e2e5e7;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.3);
}

/* Beveled Outer Bezel around LCD (Double black border matching diagram) */
.nfs-lcd-bezel {
  flex: 1;
  background: #ffffff;
  border: 2px solid #000000;
  border-radius: 4px;
  padding: 5px;
  box-shadow: 
    inset 0 0 0 2px #ffffff,
    inset 0 0 0 3.5px #000000,
    0 2px 5px rgba(0,0,0,0.15);
  box-sizing: border-box;
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* The Authentic Green 640-Character Liquid Crystal Display (LCD-160) */
.nfs-lcd-display {
  background: #98be22;
  background-image: 
    linear-gradient(rgba(0, 0, 0, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.05) 1px, transparent 1px);
  background-size: 3px 3px;
  border: 1.5px solid #233306;
  flex: 1;
  box-shadow: inset 0 0 14px rgba(32, 48, 6, 0.45);
  padding: 10px 14px;
  box-sizing: border-box;
  font-family: "Lucida Console", "Courier New", Courier, Monaco, monospace;
  font-size: 11.5px;
  font-weight: 700;
  color: #152403;
  line-height: 1.34;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  letter-spacing: 0.25px;
  position: relative;
  overflow: hidden;
}

.nfs-screen-line {
  white-space: pre;
}

.nfs-screen-header {
  font-weight: 800;
  font-size: 12px;
}

.nfs-event-counts-divider {
  text-align: center;
  border-top: 1px dashed #203604;
  border-bottom: 1px dashed #203604;
  padding: 2px 0;
  margin: 3px 0;
}

.nfs-screen-softkey-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
  font-size: 11px;
}

/* NFS Screensaver Screen */
.nfs-screensaver-view {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #98be22;
  background-image: 
    linear-gradient(rgba(0, 0, 0, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.05) 1px, transparent 1px);
  background-size: 3px 3px;
  box-sizing: border-box;
  padding: 16px 20px;
  cursor: pointer;
  animation: nfs-fade 0.4s ease-out;
}

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

/* Screensaver Logo strictly using Notifier Fire Systems attached logo */
.nfs-screensaver-logo {
  max-width: 300px;
  width: 75%;
  height: auto;
  mix-blend-mode: multiply;
  filter: drop-shadow(0 1px 2px rgba(21, 36, 3, 0.35));
  margin-bottom: 8px;
}

.nfs-screensaver-title {
  font-size: 12.5px;
  font-weight: 900;
  letter-spacing: 1.2px;
  color: #152403;
}

.nfs-screensaver-sub {
  font-size: 9.5px;
  font-weight: 700;
  color: #1a2c04;
  margin-top: 3px;
  letter-spacing: 0.5px;
}

.nfs-screensaver-time {
  font-size: 11px;
  font-weight: 800;
  margin-top: 10px;
  border: 1px solid #1a2c04;
  padding: 2px 10px;
  background: rgba(255, 255, 255, 0.15);
}

.nfs-screensaver-prompt {
  font-size: 8.5px;
  margin-top: 8px;
  opacity: 0.85;
  letter-spacing: 0.5px;
}

/* -------------------------------------------------------------
   RIGHT: Notifier Command Action Buttons (9 Red Rectangles)
   ------------------------------------------------------------- */
.nfs-action-col {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 8px 4px 6px 0;
  box-sizing: border-box;
  height: 100%;
}

.nfs-action-item {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.nfs-action-label {
  font-size: 8px;
  font-weight: 900;
  color: #000000;
  text-align: right;
  letter-spacing: -0.2px;
  line-height: 1.05;
  text-transform: uppercase;
}

/* Notifier Red Pushbuttons matching diagram (31px x 16px) */
.nfs-red-btn {
  width: 32px;
  height: 16px;
  background: #dc2626;
  border: 1.5px solid #000000;
  border-radius: 3.5px;
  box-shadow: 
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    0 1px 2px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  transition: all 0.08s ease;
  flex-shrink: 0;
  padding: 0;
}

.nfs-red-btn:hover {
  background: #ef4444;
}

.nfs-red-btn:active {
  transform: translateY(1px);
  background: #b91c1c;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.5);
}

/* -------------------------------------------------------------
   LOWER: Complete 77-Key QWERTY & Function Keypad
   ------------------------------------------------------------- */
.nfs-keypad-deck {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 16px;
  margin-top: 14px;
  padding-top: 4px;
  box-sizing: border-box;
}

.nfs-qwerty-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.nfs-key-row {
  display: flex;
  gap: 6px;
  align-items: center;
}

/* Distinctive Rounded Keycaps with Double Line Border */
.nfs-key {
  height: 38px;
  min-width: 44px;
  padding: 0 4px;
  background: #ffffff;
  border: 1.5px solid #000000;
  border-radius: 6px;
  box-shadow: 
    inset 0 0 0 1px #ffffff,
    inset 0 0 0 2px #222629,
    0 1px 2px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  color: #000000;
  cursor: pointer;
  box-sizing: border-box;
  transition: all 0.08s ease;
}

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

.nfs-key .sub-symbol {
  font-size: 8.5px;
  font-weight: 800;
  color: #374151;
  margin-top: 1px;
  line-height: 1;
}

.nfs-key:hover {
  background: #f4f5f6;
}

.nfs-key:active {
  transform: translateY(1.5px);
  background: #e2e5e7;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.3);
}

/* Special Key Sizes */
.nfs-key.key-esc {
  min-width: 58px;
  font-size: 10px;
}

.nfs-key.key-arrow {
  min-width: 44px;
  font-size: 13px;
  font-weight: 900;
}

.nfs-key.key-wide {
  min-width: 48px;
  font-size: 8px;
  line-height: 1.05;
}

.nfs-key.key-space {
  min-width: 86px;
  font-size: 9.5px;
  letter-spacing: 0.5px;
}

.nfs-key.key-enter {
  min-width: 78px;
  font-size: 10px;
}

/* Right Function Key Columns */
.nfs-func-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.nfs-func-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
}

.nfs-func-label {
  font-size: 7.5px;
  font-weight: 900;
  color: #000000;
  text-align: right;
  line-height: 1.05;
  text-transform: uppercase;
  letter-spacing: -0.2px;
  max-width: 60px;
}

.nfs-func-key {
  width: 46px;
  height: 38px;
  background: #ffffff;
  border: 1.5px solid #000000;
  border-radius: 6px;
  box-shadow: 
    inset 0 0 0 1px #ffffff,
    inset 0 0 0 2px #222629,
    0 1px 2px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 900;
  color: #000000;
  cursor: pointer;
  box-sizing: border-box;
  transition: all 0.08s ease;
}

.nfs-func-key:hover {
  background: #f4f5f6;
}

.nfs-func-key:active {
  transform: translateY(1.5px);
  background: #e2e5e7;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.3);
}

/* Responsive adjustment for screens smaller than 1024px */
@media (max-width: 1040px) {
  .nfs3030-cabinet {
    transform-origin: top center;
    width: 100%;
    overflow-x: auto;
  }
}
