/* =========================================================
   REPRO İSTANBUL — Prepress Canlı Teknik Terminal (WhatsApp)
   Fully independent module: own file, own classes (ww-*),
   self-contained tokens — does not depend on styles.css or any
   other stylesheet. Injected at runtime by whatsapp-widget.js,
   meant to be loaded unchanged on every page. Positioned fixed
   bottom-right; never touches page flow, so it cannot affect
   any existing layout, footer, or button.
   ========================================================= */

:root {
  --ww-bg: #0B0C0E;
  --ww-panel: #121215;
  --ww-border: rgba(255, 255, 255, 0.08);
  --ww-text: #F3F4F6;
  --ww-text-secondary: #9CA3AF;
  --ww-green: #22C55E;
  --ww-green-dim: rgba(34, 197, 94, 0.12);
  --ww-mono: 'IBM Plex Mono', monospace;
  --ww-body: 'Inter', 'Satoshi', system-ui, sans-serif;
  --ww-display: 'Cabinet Grotesk', 'General Sans', sans-serif;
  --ww-ease: cubic-bezier(0.16, 1, 0.3, 1);
}

.ww-widget {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 99997;
  transition: bottom 0.3s var(--ww-ease);
}
/* Raised above the cookie consent bar while it's on screen, so
   the two fixed elements never overlap — height is read live
   from the cookiebar element itself (see whatsapp-widget.js). */
.ww-widget.is-raised {
  bottom: calc(24px + var(--ww-banner-offset, 0px));
}

/* --- Floating trigger (closed state) --- */
.ww-trigger {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px 10px 14px;
  background: var(--ww-bg);
  border: 1px solid var(--ww-border);
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  transition: transform 0.3s var(--ww-ease), box-shadow 0.3s var(--ww-ease), border-color 0.3s var(--ww-ease);
}
.ww-trigger:hover,
.ww-trigger:focus-visible {
  transform: translateY(-3px);
  border-color: rgba(34, 197, 94, 0.5);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.4), 0 0 24px rgba(34, 197, 94, 0.35);
}
.ww-widget.is-open .ww-trigger {
  display: none;
}

.ww-trigger__pulse {
  position: relative;
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ww-green);
}
.ww-trigger__pulse::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--ww-green);
  animation: ww-pulse 2s infinite;
}

.ww-trigger__tag {
  font-family: var(--ww-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--ww-green);
  white-space: nowrap;
}

.ww-trigger__divider {
  width: 1px;
  height: 16px;
  background: var(--ww-border);
  flex: 0 0 auto;
}

.ww-trigger__icon {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  color: var(--ww-green);
}

.ww-trigger__label {
  font-family: var(--ww-body);
  font-size: 13px;
  font-weight: 600;
  color: var(--ww-text);
  white-space: nowrap;
}

/* --- Terminal panel (open state) --- */
.ww-panel {
  position: absolute;
  right: 0;
  bottom: 0;
  width: min(340px, 89vw);
  background: var(--ww-panel);
  border: 1px solid var(--ww-border);
  border-radius: 14px;
  padding: 20px 20px 18px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px) scale(0.98);
  transform-origin: bottom right;
  transition: opacity 0.3s var(--ww-ease), transform 0.3s var(--ww-ease), visibility 0.3s;
}
.ww-widget.is-open .ww-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.ww-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.ww-panel__status {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ww-panel__status-dot {
  position: relative;
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ww-green);
}
.ww-panel__status-dot::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--ww-green);
  animation: ww-pulse 2s infinite;
}
.ww-panel__status-text {
  font-family: var(--ww-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--ww-green);
  white-space: nowrap;
}

.ww-panel__close {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  border-radius: 6px;
  color: var(--ww-text-secondary);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: color 0.2s var(--ww-ease), background 0.2s var(--ww-ease);
}
.ww-panel__close:hover {
  color: var(--ww-text);
  background: rgba(255, 255, 255, 0.06);
}

.ww-panel__title {
  font-family: var(--ww-display);
  font-weight: 700;
  font-size: 16.5px;
  letter-spacing: -0.01em;
  color: var(--ww-text);
  margin: 0 0 8px;
}

.ww-panel__desc {
  font-family: var(--ww-body);
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--ww-text-secondary);
  margin: 0 0 18px;
}

.ww-panel__actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}

.ww-panel__action {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--ww-border);
  border-radius: 8px;
  text-decoration: none;
  font-family: var(--ww-body);
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.35;
  color: var(--ww-text);
  transition: border-color 0.2s var(--ww-ease), background 0.2s var(--ww-ease);
}
.ww-panel__action:hover,
.ww-panel__action:focus-visible {
  border-color: rgba(34, 197, 94, 0.45);
  background: var(--ww-green-dim);
}
.ww-panel__action-icon {
  flex: 0 0 auto;
  font-size: 15px;
  line-height: 1;
}

.ww-panel__direct {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px 14px;
  background: var(--ww-green);
  border: 1px solid var(--ww-green);
  border-radius: 8px;
  text-decoration: none;
  font-family: var(--ww-mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #06210f;
  transition: filter 0.25s var(--ww-ease), transform 0.25s var(--ww-ease);
}
.ww-panel__direct:hover,
.ww-panel__direct:focus-visible {
  filter: brightness(1.08);
  transform: translateY(-1px);
}
.ww-panel__direct svg {
  flex: 0 0 auto;
}

@keyframes ww-pulse {
  0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
  70% { box-shadow: 0 0 0 10px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

@media (max-width: 480px) {
  .ww-widget { right: 16px; bottom: 16px; }
  .ww-trigger { padding: 10px 14px 10px 12px; }
  .ww-trigger__label { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .ww-trigger,
  .ww-panel,
  .ww-panel__direct,
  .ww-widget {
    transition: none;
  }
  .ww-trigger__pulse::before,
  .ww-panel__status-dot::before {
    animation: none;
  }
}
