/* ==========================================================================
   FIREFINDER PLUS (AMPAC) FIRE ALARM CONTROL PANEL FASCIA STYLES
   Pixel-accurate rendition conforming to EN54-2 & EN54-4 specifications
   ========================================================================== */

:root {
  --ff-chassis-bg: #c9c7b6;
  --ff-chassis-dark: #b8b6a3;
  --ff-chassis-border: #808277;
  
  --ff-text: #1b1e22;
  --ff-text-muted: #4b4e54;
  
  --ff-lcd-bg: #c9dc31;
  --ff-lcd-text: #111a02;
  --ff-lcd-border: #4d5240;
  
  --ff-btn-bg: linear-gradient(180deg, #f4f4ee 0%, #dedecf 55%, #cacab9 100%);
  --ff-btn-border: #75776d;
  --ff-btn-active: #b5b5a4;
  --ff-recess-bg: #b0aea0;
  
  --ff-led-off-red: #331414;
  --ff-led-off-yellow: #312b0e;
  --ff-led-off-green: #0a2614;
  
  --ff-led-red: #ff2222;
  --ff-led-yellow: #ffb800;
  --ff-led-green: #10e248;
}

/* Cabinet Container */
.firefinder-cabinet {
  position: relative;
  width: 1000px;
  max-width: 100%;
  margin: 0 auto;
  background: linear-gradient(180deg, #d3d1c1 0%, var(--ff-chassis-bg) 40%, var(--ff-chassis-dark) 100%);
  border: 4px solid var(--ff-chassis-border);
  border-radius: 8px;
  box-shadow: 
    0 16px 45px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    inset 0 -2px 0 rgba(0, 0, 0, 0.25);
  padding: 22px 24px 20px 24px;
  box-sizing: border-box;
  user-select: none;
  font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
  color: var(--ff-text);
  overflow: hidden;
}

/* --------------------------------------------------------------------------
   UPPER SECTION: Left Big LEDs | Center Yellow-Green LCD | Right Annunciators
   -------------------------------------------------------------------------- */
.ff-upper-row {
  display: grid;
  grid-template-columns: 190px 1fr 180px;
  gap: 16px;
  align-items: center;
  margin-bottom: 20px;
}

/* Left Major Alert Annunciators */
.ff-major-alerts {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-left: 6px;
}

.ff-alert-item {
  display: flex;
  align-items: center;
  gap: 14px;
}

.ff-alert-label {
  font-size: 17px;
  font-weight: 900;
  letter-spacing: 0.8px;
  color: #111417;
}

.ff-alert-label.red-text {
  color: #b91c1c;
}

/* Prominent Alert LEDs */
.ff-major-led {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid #4a4d45;
  box-sizing: border-box;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.ff-major-led.red {
  background: var(--ff-led-off-red);
}

.ff-major-led.red.active {
  background: var(--ff-led-red);
  box-shadow: 0 0 12px var(--ff-led-red), inset 0 0 4px #ffffff;
  animation: ff-fire-pulse 1s infinite alternate ease-in-out;
}

.ff-major-led.yellow {
  background: var(--ff-led-off-yellow);
}

.ff-major-led.yellow.active {
  background: var(--ff-led-yellow);
  box-shadow: 0 0 10px var(--ff-led-yellow), inset 0 0 3px #ffffff;
}

@keyframes ff-fire-pulse {
  0% { transform: scale(1); filter: brightness(1); }
  100% { transform: scale(1.08); filter: brightness(1.25); }
}

/* --------------------------------------------------------------------------
   CENTER: High-Contrast Yellow-Green Phosphor LCD Screen
   -------------------------------------------------------------------------- */
.ff-lcd-bezel {
  background: #2b3023;
  padding: 5px;
  border-radius: 4px;
  border: 2px solid #555b48;
  box-shadow: inset 0 3px 6px rgba(0, 0, 0, 0.7);
}

.ff-lcd-display {
  background: var(--ff-lcd-bg);
  color: var(--ff-lcd-text);
  font-family: "Courier New", Courier, monospace;
  height: 165px;
  border-radius: 2px;
  padding: 10px 14px;
  box-sizing: border-box;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.ff-lcd-header-line {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}

.ff-lcd-zone-line {
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 4px;
}

.ff-lcd-nav-prompt {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-top: 4px;
}

.ff-lcd-status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-weight: 900;
  border-top: 1.5px solid rgba(20, 30, 2, 0.4);
  padding-top: 4px;
  margin-top: 4px;
  letter-spacing: 0.5px;
}

.ff-status-col {
  white-space: nowrap;
}

/* Screensaver Mode */
.ff-screensaver-view {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--ff-lcd-bg);
  color: var(--ff-lcd-text);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 10px 14px;
  box-sizing: border-box;
  animation: ff-fade-in 0.3s ease;
}

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

.ff-ss-top {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 900;
}

.ff-ss-mid {
  text-align: center;
}

.ff-ss-logo {
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 2px;
}

.ff-ss-sub {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
  margin-top: 4px;
  opacity: 0.85;
}

/* --------------------------------------------------------------------------
   RIGHT: Two-Group Annunciator Column (System Status & Outputs)
   -------------------------------------------------------------------------- */
.ff-right-annunciators {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding-right: 4px;
}

.ff-annunciator-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ff-ann-label {
  font-size: 11px;
  font-weight: 900;
  color: #1f2328;
  letter-spacing: 0.3px;
}

.ff-ann-led {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 1px solid #4a4d45;
  box-sizing: border-box;
  margin-left: 8px;
  flex-shrink: 0;
}

.ff-ann-led.green { background: var(--ff-led-off-green); }
.ff-ann-led.green.active {
  background: var(--ff-led-green);
  box-shadow: 0 0 8px var(--ff-led-green), inset 0 0 3px #ffffff;
}

.ff-ann-led.yellow { background: var(--ff-led-off-yellow); }
.ff-ann-led.yellow.active {
  background: var(--ff-led-yellow);
  box-shadow: 0 0 8px var(--ff-led-yellow), inset 0 0 2px #ffffff;
}

.ff-ann-led.red { background: var(--ff-led-off-red); }
.ff-ann-led.red.active {
  background: var(--ff-led-red);
  box-shadow: 0 0 8px var(--ff-led-red), inset 0 0 3px #ffffff;
}

.ff-ann-divider {
  height: 1px;
  background: rgba(0, 0, 0, 0.18);
  margin: 3px 0;
}

/* --------------------------------------------------------------------------
   MIDDLE COMMAND BUTTONS ROW (Horizontal Primary Controls)
   -------------------------------------------------------------------------- */
.ff-middle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 22px;
  padding: 4px 0;
}

/* Embossed Pill Button Housing */
.ff-pill-btn-wrap {
  background: var(--ff-recess-bg);
  padding: 3px;
  border-radius: 20px;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.35), 0 1px 0 rgba(255, 255, 255, 0.6);
  display: inline-flex;
}

.ff-pill-btn {
  background: var(--ff-btn-bg);
  border: 1.5px solid var(--ff-btn-border);
  border-radius: 17px;
  padding: 6px 12px;
  color: var(--ff-text);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.3px;
  text-align: center;
  line-height: 1.15;
  cursor: pointer;
  box-shadow: 
    0 2px 3px rgba(0, 0, 0, 0.25),
    inset 0 1px 0 #ffffff;
  transition: all 0.08s ease;
  min-height: 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  position: relative;
}

.ff-pill-btn:hover {
  background: linear-gradient(180deg, #ffffff 0%, #ebebe0 55%, #d5d5c4 100%);
}

.ff-pill-btn:active {
  transform: translateY(1.5px);
  background: var(--ff-btn-active);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.4);
}

/* Integrated Embedded LEDs in Button Corner */
.ff-btn-led {
  position: absolute;
  top: 7px;
  left: 9px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px solid #4a4d45;
  box-sizing: border-box;
}

.ff-btn-led.yellow { background: var(--ff-led-off-yellow); }
.ff-btn-led.yellow.active {
  background: var(--ff-led-yellow);
  box-shadow: 0 0 7px var(--ff-led-yellow), inset 0 0 2px #fff;
}

.ff-btn-led.red { background: var(--ff-led-off-red); }
.ff-btn-led.red.active {
  background: var(--ff-led-red);
  box-shadow: 0 0 8px var(--ff-led-red), inset 0 0 2px #fff;
  animation: ff-fire-pulse 1s infinite alternate;
}

/* Specific Middle Button Widths */
.ff-pill-btn.delay-override { width: 96px; padding-left: 20px; }
.ff-pill-btn.alarms-silence { width: 110px; padding-left: 20px; }
.ff-pill-btn.silence-buzzer { width: 100px; }
.ff-pill-btn.reset { width: 95px; }
.ff-pill-btn.evacuate { width: 100px; padding-left: 18px; }

/* Dual PREVIOUS / NEXT Pill with MULTIPLE ALARMS */
.ff-dual-pill-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.ff-dual-pill-wrap {
  background: var(--ff-recess-bg);
  padding: 3px;
  border-radius: 20px;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.35), 0 1px 0 rgba(255, 255, 255, 0.6);
  display: flex;
  align-items: center;
  gap: 24px;
  position: relative;
}

.ff-dual-btn {
  background: var(--ff-btn-bg);
  border: 1.5px solid var(--ff-btn-border);
  border-radius: 17px;
  width: 82px;
  height: 48px;
  color: var(--ff-text);
  font-size: 10.5px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 2px 3px rgba(0, 0, 0, 0.25), inset 0 1px 0 #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.08s ease;
}

.ff-dual-btn:active {
  transform: translateY(1.5px);
  background: var(--ff-btn-active);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.4);
}

.ff-multi-alarm-badge {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
}

.ff-multi-led {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--ff-led-off-red);
  border: 1px solid #4a4d45;
  box-sizing: border-box;
  margin-bottom: 2px;
}

.ff-multi-led.active {
  background: var(--ff-led-red);
  box-shadow: 0 0 8px var(--ff-led-red), inset 0 0 2px #fff;
}

.ff-multi-text {
  font-size: 7px;
  font-weight: 900;
  color: #1e2225;
  text-align: center;
  line-height: 1;
}

.ff-arrow-graphic {
  margin-top: 3px;
  width: 150px;
  height: 8px;
}

/* --------------------------------------------------------------------------
   LOWER SECTION: 4 Left Pills | 4x4 Numeric Deck | Right Function Deck | Keyswitch
   -------------------------------------------------------------------------- */
.ff-lower-deck {
  display: grid;
  grid-template-columns: 190px 1fr 180px 155px;
  gap: 16px;
  align-items: start;
}

/* Left Stack: 4 Annunciator Disable Pills */
.ff-left-stack {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.ff-stack-pill-wrap {
  background: var(--ff-recess-bg);
  padding: 2.5px;
  border-radius: 17px;
  box-shadow: inset 0 2px 3px rgba(0, 0, 0, 0.35), 0 1px 0 rgba(255, 255, 255, 0.5);
}

.ff-stack-btn {
  background: var(--ff-btn-bg);
  border: 1.5px solid var(--ff-btn-border);
  border-radius: 15px;
  height: 38px;
  width: 100%;
  padding: 0 8px 0 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ff-text);
  font-size: 9.5px;
  font-weight: 900;
  line-height: 1.15;
  text-align: center;
  box-shadow: 0 1.5px 2px rgba(0,0,0,0.2), inset 0 1px 0 #fff;
  cursor: pointer;
  position: relative;
  transition: all 0.08s ease;
  box-sizing: border-box;
}

.ff-stack-btn:active {
  transform: translateY(1px);
  background: var(--ff-btn-active);
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.3);
}

.ff-stack-led {
  position: absolute;
  left: 9px;
  top: 50%;
  transform: translateY(-50%);
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--ff-led-off-yellow);
  border: 1px solid #4a4d45;
  box-sizing: border-box;
}

.ff-stack-led.active {
  background: var(--ff-led-yellow);
  box-shadow: 0 0 7px var(--ff-led-yellow), inset 0 0 2px #fff;
}

/* Center Keypad: 4 Columns x 4 Rows */
.ff-keypad-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 9px 10px;
  justify-items: center;
}

.ff-key-pill-wrap {
  background: var(--ff-recess-bg);
  padding: 2.5px;
  border-radius: 18px;
  box-shadow: inset 0 2px 3px rgba(0, 0, 0, 0.35), 0 1px 0 rgba(255, 255, 255, 0.5);
  width: 82px;
}

.ff-key-pill {
  background: var(--ff-btn-bg);
  border: 1.5px solid var(--ff-btn-border);
  border-radius: 16px;
  width: 100%;
  height: 38px;
  color: var(--ff-text);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 1.5px 2.5px rgba(0,0,0,0.22), inset 0 1px 0 #ffffff;
  transition: all 0.08s ease;
  padding: 0;
  box-sizing: border-box;
}

.ff-key-pill:active {
  transform: translateY(1px);
  background: var(--ff-btn-active);
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.3);
}

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

.ff-key-sub {
  font-size: 7px;
  font-weight: 800;
  color: #3b4046;
  margin-top: 2px;
  line-height: 1;
}

/* Right Navigation & Menu Cluster */
.ff-nav-cluster {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.ff-nav-pill-wrap {
  background: var(--ff-recess-bg);
  padding: 2.5px;
  border-radius: 17px;
  box-shadow: inset 0 2px 3px rgba(0, 0, 0, 0.35), 0 1px 0 rgba(255, 255, 255, 0.5);
  width: 100%;
  box-sizing: border-box;
}

.ff-nav-wide-btn {
  background: var(--ff-btn-bg);
  border: 1.5px solid var(--ff-btn-border);
  border-radius: 15px;
  width: 100%;
  height: 38px;
  color: var(--ff-text);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.5px;
  cursor: pointer;
  box-shadow: 0 1.5px 2px rgba(0,0,0,0.2), inset 0 1px 0 #fff;
  transition: all 0.08s ease;
}

.ff-nav-wide-btn:active {
  transform: translateY(1px);
  background: var(--ff-btn-active);
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.3);
}

.ff-nav-split-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
}

.ff-nav-split-btn {
  background: var(--ff-btn-bg);
  border: 1.5px solid var(--ff-btn-border);
  border-radius: 15px;
  height: 38px;
  color: var(--ff-text);
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 1.5px 2px rgba(0,0,0,0.2), inset 0 1px 0 #fff;
  transition: all 0.08s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ff-nav-split-btn:active {
  transform: translateY(1px);
  background: var(--ff-btn-active);
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.3);
}

/* --------------------------------------------------------------------------
   BOTTOM RIGHT: EN54-2&4 Standards Inscription & Controls Rotary Key Switch
   -------------------------------------------------------------------------- */
.ff-controls-plate {
  background: linear-gradient(180deg, #9da098 0%, #8c9086 100%);
  border: 2px solid #5a5d55;
  border-radius: 6px;
  padding: 10px 8px;
  box-shadow: 
    inset 0 1px 2px rgba(255,255,255,0.4),
    0 3px 6px rgba(0,0,0,0.25);
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  box-sizing: border-box;
}

.ff-en54-text {
  position: absolute;
  top: -15px;
  right: 2px;
  font-size: 9px;
  font-weight: 800;
  color: #26292d;
  letter-spacing: 0.3px;
}

.ff-switch-header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  padding: 0 8px;
  box-sizing: border-box;
  margin-bottom: 2px;
}

.ff-pos-symbol {
  font-size: 15px;
  font-weight: 900;
  color: #21262d;
  cursor: pointer;
  transition: color 0.15s ease;
}

.ff-pos-symbol.active {
  color: #000000;
  text-shadow: 0 0 6px rgba(255, 255, 255, 0.8);
}

.ff-rotary-barrel {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #e1e3de 0%, #8e928a 70%, #4a4d46 100%);
  border: 2px solid #232724;
  box-shadow: 
    0 3px 6px rgba(0,0,0,0.4),
    inset 0 1px 2px #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  margin: 4px 0 6px 0;
}

.ff-rotary-slot {
  width: 26px;
  height: 5px;
  background: #141715;
  border-radius: 2px;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.8);
}

/* OFF (O) = 0deg (horizontal), ON (I) = 90deg (vertical) */
.ff-rotary-barrel.pos-on {
  transform: rotate(90deg);
}

.ff-rotary-barrel.pos-off {
  transform: rotate(0deg);
}

.ff-controls-label {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.8px;
  color: #14181c;
}
