/* Footer Component - Google & Gemini Argon Terminal Badge & Interactive WhatsApp Dev Prompt
   8px grid & Design Token System (Strictly NO !important)
   ========================================================================== */

/* Elevate footer and its template-part wrapper above main when terminal dialog or tooltip is open or hovered */
.wp-block-template-part:has(.argon-terminal-badge:is(:hover, :focus-within, .is-active)),
.wp-block-template-part.has-open-terminal,
.wp-block-template-part.has-hovered-badge {
  position: relative;
  z-index: 1000;
}

.site-footer.has-open-terminal,
.site-footer.has-hovered-badge,
.site-footer:has(.argon-terminal-badge:is(:hover, :focus-within, .is-active)) {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1000;
}

/* 4th Row: Google Cloud AI Partner & Gemini Argon Terminal Badge */
.site-footer__row--argon {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 4px;
}

.argon-terminal-badge {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 9999px;
  outline: none;
}

.argon-terminal-badge:focus-visible .argon-pill {
  outline: 2px solid var(--focus-ring);
  outline-offset: 3px;
  border-color: rgba(66, 133, 244, 0.7);
  box-shadow: 0 0 16px rgba(66, 133, 244, 0.35);
}

/* Tooltip for Google Cloud AI Partner badge */
.argon-terminal-badge:is(:hover, :focus-visible) > .tip:not(.tip--side) {
  opacity: 1;
  transform: translate3d(-50%, 0, 0);
  pointer-events: none;
}

.argon-terminal-badge.is-active > .tip {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* The interactive pill button: icons in front of text */
.argon-pill {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 5px 14px;
  background: rgba(26, 26, 26, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 9999px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--on-surface-soft);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
  transition:
    background var(--duration-ui) var(--ease-out),
    border-color var(--duration-ui) var(--ease-out),
    color var(--duration-ui) var(--ease-out),
    transform var(--duration-ui) var(--ease-out),
    box-shadow var(--duration-ui) var(--ease-out);
}

.argon-terminal-badge:hover .argon-pill,
.argon-terminal-badge.is-active .argon-pill {
  background: rgba(36, 36, 44, 0.95);
  border-color: rgba(66, 133, 244, 0.55);
  color: var(--on-surface);
  transform: translateY(-2px);
  box-shadow:
    0 4px 20px rgba(0, 0, 0, 0.5),
    0 0 14px rgba(66, 133, 244, 0.3);
}

.google-logo {
  display: block;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.argon-pill__text {
  font-family: var(--font-body);
  font-size: var(--text-micro);
  font-weight: var(--weight-ui);
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.gemini-star--inline {
  display: block;
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  filter: drop-shadow(0 0 3px rgba(66, 133, 244, 0.8));
  transition:
    transform var(--duration-ui) var(--ease-out),
    filter var(--duration-ui) var(--ease-out);
}

.argon-terminal-badge:hover .gemini-star--inline,
.argon-terminal-badge.is-active .gemini-star--inline {
  transform: rotate(45deg) scale(1.15);
  filter: drop-shadow(0 0 8px rgba(155, 114, 207, 0.9));
}

/* ==========================================================================
   Code Terminal Dialog Window (Opens strictly ON CLICK, never on hover!)
   Aligned to the right edge with transform-origin right so it NEVER clips!
   ========================================================================== */

.terminal-popup {
  position: absolute;
  bottom: calc(100% + 14px);
  right: 0;
  left: auto;
  transform: translateY(8px) scale(0.96);
  transform-origin: bottom right;
  width: 340px;
  max-width: calc(100vw - 32px);
  background: rgba(11, 13, 19, 0.97);
  border: 1px solid rgba(138, 180, 248, 0.38);
  border-radius: var(--space-1);
  box-shadow:
    0 16px 40px rgba(0, 0, 0, 0.85),
    0 0 24px rgba(66, 133, 244, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 1000;
  text-align: left;
  cursor: default;
  transition:
    opacity 0.22s var(--ease-out),
    transform 0.22s var(--ease-out),
    visibility 0.22s var(--ease-out);
}

.terminal-popup::after {
  content: "";
  position: absolute;
  top: 100%;
  right: 28px;
  left: auto;
  border-width: 7px 7px 0 7px;
  border-style: solid;
  border-color: rgba(138, 180, 248, 0.38) transparent transparent transparent;
}

/* Strictly open ON CLICK (via .is-active), NOT on mouse hover! */
.argon-terminal-badge.is-active .terminal-popup {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

/* Terminal Title Bar */
.terminal-popup__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-1);
  padding: 8px 12px;
  background: rgba(22, 27, 38, 0.92);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: calc(var(--space-1) - 1px) calc(var(--space-1) - 1px) 0 0;
}

.terminal-popup__dots {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.terminal-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.terminal-dot--red {
  background-color: #ff5f56;
}

.terminal-dot--yellow {
  background-color: #ffbd2e;
}

.terminal-dot--green {
  background-color: #27c93f;
}

.terminal-popup__title {
  font-family: ui-monospace, SFMono-Regular, "Roboto Mono", Menlo, Consolas, monospace;
  font-size: 0.6875rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.55);
  margin-left: 4px;
  flex: 1;
}

.terminal-popup__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  padding: 0;
  background: transparent;
  border: 0;
  color: rgba(255, 255, 255, 0.45);
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  border-radius: 3px;
  transition: color 0.15s var(--ease-out), background-color 0.15s var(--ease-out);
}

.terminal-popup__close:hover {
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.1);
}

/* Terminal Body */
.terminal-popup__body {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-family: ui-monospace, SFMono-Regular, "Roboto Mono", Menlo, Consolas, monospace;
  font-size: 0.75rem;
  line-height: 1.45;
}

.terminal-popup__line {
  display: flex;
  align-items: center;
  gap: 6px;
}

.terminal-prompt {
  color: #34A853;
  font-weight: 700;
  user-select: none;
  flex-shrink: 0;
}

.terminal-cmd {
  color: #8AB4F8;
  font-weight: 500;
}

/* Sharp Glowing Gemini Hero Feature */
.terminal-popup__gemini-hero {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: rgba(66, 133, 244, 0.08);
  border: 1px solid rgba(66, 133, 244, 0.28);
  border-radius: 6px;
}

.gemini-star--hero {
  display: block;
  flex-shrink: 0;
  filter: drop-shadow(0 0 6px rgba(66, 133, 244, 0.9));
}

.terminal-hero-text {
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: #E8EAED;
}

.terminal-hero-text strong {
  font-weight: 700;
  background: linear-gradient(135deg, #8AB4F8 0%, #C58AF9 50%, #F28B82 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Terminal Specs List */
.terminal-popup__specs {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 4px 2px;
  border-top: 1px dashed rgba(255, 255, 255, 0.1);
  border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
}

.terminal-spec {
  margin: 0;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.7);
}

.terminal-key {
  color: rgba(255, 255, 255, 0.45);
  flex-shrink: 0;
}

.terminal-val {
  color: #E8EAED;
  font-weight: 500;
  text-align: right;
}

.terminal-val--cyan {
  color: #8AB4F8;
}

.terminal-val--gold {
  color: var(--color-gold);
}

.terminal-val--green {
  color: #81C995;
}

.terminal-val--active {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #81C995;
  font-weight: 600;
}

.terminal-status-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background-color: #34A853;
  border-radius: 50%;
  box-shadow: 0 0 6px #34A853;
}

/* Interactive Terminal Prompt Form -> Sends to Dev WhatsApp */
.terminal-popup__form {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  padding: 4px 6px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(52, 168, 83, 0.38);
  border-radius: 6px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.terminal-popup__form:focus-within {
  border-color: #34A853;
  box-shadow: 0 0 10px rgba(52, 168, 83, 0.25);
}

.terminal-input {
  flex: 1;
  min-width: 0;
  min-height: 26px;
  padding: 2px 4px;
  background: transparent;
  border: 0;
  color: #E8EAED;
  font-family: ui-monospace, SFMono-Regular, "Roboto Mono", Menlo, Consolas, monospace;
  font-size: 0.72rem;
  caret-color: #34A853;
}

.terminal-input::placeholder {
  color: rgba(255, 255, 255, 0.38);
}

.terminal-input:focus {
  outline: none;
}

.terminal-send {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 4px;
  min-height: 26px;
  min-width: 26px;
  padding: 2px 8px;
  background: rgba(52, 168, 83, 0.2);
  border: 1px solid rgba(52, 168, 83, 0.5);
  border-radius: 4px;
  color: #81C995;
  font-family: ui-monospace, SFMono-Regular, "Roboto Mono", Menlo, Consolas, monospace;
  font-size: 0.65rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.terminal-send:hover {
  background: #34A853;
  color: #05070B;
}

@media (max-width: 859px) {
  .terminal-popup {
    width: 308px;
    bottom: calc(100% + 10px);
  }
}
