/**
 * Garden Comments – garden.css
 * Author: Światło Jogi | Version: 1.3.2
 */

#gc-overlay *, #gc-overlay *::before, #gc-overlay *::after { box-sizing: border-box; }

/* ── TRIGGER BUTTON ── */
.gc-trigger-wrap { display: inline-block; margin: 8px 0; }
.gc-open-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 32px; font-size: 1rem; font-weight: 600;
  color: #fff; border: none; cursor: pointer; font-family: inherit;
  transition: filter .2s, transform .15s;
}
.gc-open-btn:hover { filter: brightness(1.15); transform: translateY(-2px); }
.gc-open-btn--pill    { border-radius: 999px; }
.gc-open-btn--rounded { border-radius: 10px; }
.gc-open-btn--square  { border-radius: 2px; }

/* ── OVERLAY ── */
#gc-overlay {
  position: fixed; inset: 0; z-index: 99999;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.65); backdrop-filter: blur(4px);
}
#gc-overlay[hidden] { display: none !important; }

/* ── WINDOW ── */
.gc-window {
  position: relative;
  width: min(1400px, 96vw);
  height: min(820px, 92vh);
  background: #0d2010; border-radius: 14px; overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow: 0 30px 80px rgba(0,0,0,.7);
}

/* ── HEADER ── */
.gc-header {
  flex-shrink: 0; display: flex; align-items: center;
  padding: 0 14px; height: 48px;
  background: rgba(0,0,0,.45);
  border-bottom: 1px solid rgba(255,255,255,.08); gap: 8px;
}
.gc-garden-tabs { display: flex; gap: 6px; overflow-x: auto; flex: 1; }
.gc-tab {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px;
  border-radius: 20px; font-size: .78rem; font-weight: 600;
  color: rgba(255,255,255,.65); background: rgba(255,255,255,.07);
  border: 1px solid transparent; cursor: pointer; white-space: nowrap; transition: all .15s;
}
.gc-tab:hover { color: #fff; background: rgba(255,255,255,.13); }
.gc-tab-active { color: #fff; background: rgba(76,175,80,.3); border-color: rgba(76,175,80,.5); }
.gc-tab-count { font-size: .7rem; opacity: .7; }
.gc-close-btn {
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(255,255,255,.1); border: none;
  color: rgba(255,255,255,.8); font-size: 1rem; cursor: pointer; flex-shrink: 0; transition: background .15s;
}
.gc-close-btn:hover { background: rgba(255,60,60,.4); color: #fff; }

/* ── STAGE ── */
.gc-stage {
  position: relative; flex: 1; overflow: hidden;
  background: #0d2010; touch-action: none;
}
.gc-stage-bg {
  position: absolute; inset: 0;
  background: linear-gradient(160deg,#0d2e10,#1a5a20 40%,#2a7a28 60%,#1a5a20 80%,#0d2e10);
}
.gc-bg-img, .gc-bg-vid {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  pointer-events: none; user-select: none;
}

/* ── SVG CANVAS ── */
.gc-svg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none; overflow: visible;
}
.gc-entry { pointer-events: all; }

/* ══════════════════════════════════════════════════════════════
   GLOW EFFECTS — bez najechania i z najechaniem
══════════════════════════════════════════════════════════════ */

/* Podstawowy shimmer — zawsze aktywny */
.gc-entry {
  cursor: pointer;
  will-change: filter;
}

/* Każdy typ ma swój kolor i rytm */
.gc-el-flower    { animation: gc-glow-flower    3.8s ease-in-out infinite; }
.gc-el-butterfly { animation: gc-glow-butterfly 4.6s ease-in-out infinite; }
.gc-el-bee       { animation: gc-glow-bee       3.2s ease-in-out infinite; }
.gc-el-dragonfly { animation: gc-glow-dragonfly 5.0s ease-in-out infinite; }
.gc-el-apple     { animation: gc-glow-fruit     4.2s ease-in-out infinite; }
.gc-el-cherry    { animation: gc-glow-fruit     3.9s ease-in-out infinite; }

/* Stagger — każdy element ma inny delay */
.gc-entry:nth-child(2n+1)  { animation-delay: -0.7s; animation-duration: 4.1s; }
.gc-entry:nth-child(3n+1)  { animation-delay: -1.9s; }
.gc-entry:nth-child(4n+1)  { animation-delay: -3.2s; animation-duration: 4.7s; }
.gc-entry:nth-child(5n+2)  { animation-delay: -0.4s; animation-duration: 3.5s; }
.gc-entry:nth-child(7n+3)  { animation-delay: -2.6s; animation-duration: 5.1s; }
.gc-entry:nth-child(11n+4) { animation-delay: -1.1s; animation-duration: 3.8s; }

/* ── Hover: mocny pełny rozbłysk ── */
.gc-entry:hover {
  animation-play-state: paused !important;
  filter:
    brightness(1.6)
    drop-shadow(0 0 4px rgba(255,255,200,1))
    drop-shadow(0 0 10px rgba(255,240,100,.9))
    drop-shadow(0 0 22px rgba(255,200,50,.7))
    drop-shadow(0 0 40px rgba(255,160,20,.45))
    !important;
  transform: scale(1.12);
  transition: transform .2s, filter .2s;
}

/* Kwiatek — złoto-różowy */
@keyframes gc-glow-flower {
  0%,100% {
    filter: brightness(1.05)
      drop-shadow(0 0 3px rgba(255,200,80,.5))
      drop-shadow(0 0 8px rgba(255,160,20,.25));
  }
  50% {
    filter: brightness(1.35)
      drop-shadow(0 0 6px rgba(255,230,100,.9))
      drop-shadow(0 0 16px rgba(255,200,50,.65))
      drop-shadow(0 0 30px rgba(255,160,20,.4));
  }
}

/* Motyl — fioletowo-magenta */
@keyframes gc-glow-butterfly {
  0%,100% {
    filter: brightness(1.05)
      drop-shadow(0 0 3px rgba(200,100,255,.45))
      drop-shadow(0 0 8px rgba(160,60,220,.2));
  }
  33% {
    filter: brightness(1.25)
      drop-shadow(0 0 5px rgba(100,200,255,.75))
      drop-shadow(0 0 14px rgba(80,160,255,.5))
      drop-shadow(0 0 26px rgba(60,120,255,.3));
  }
  66% {
    filter: brightness(1.35)
      drop-shadow(0 0 6px rgba(255,80,220,.8))
      drop-shadow(0 0 16px rgba(220,50,200,.55))
      drop-shadow(0 0 30px rgba(180,30,180,.35));
  }
}

/* Pszczoła — intensywny bursztyn */
@keyframes gc-glow-bee {
  0%,100% {
    filter: brightness(1.05)
      drop-shadow(0 0 3px rgba(255,200,0,.55))
      drop-shadow(0 0 8px rgba(255,160,0,.3));
  }
  50% {
    filter: brightness(1.45)
      drop-shadow(0 0 7px rgba(255,230,50,1))
      drop-shadow(0 0 18px rgba(255,190,0,.75))
      drop-shadow(0 0 35px rgba(255,140,0,.45));
  }
}

/* Ważka — turkusowo-lodowy */
@keyframes gc-glow-dragonfly {
  0%,100% {
    filter: brightness(1.05)
      drop-shadow(0 0 3px rgba(80,220,200,.5))
      drop-shadow(0 0 8px rgba(50,180,200,.25));
  }
  50% {
    filter: brightness(1.3)
      drop-shadow(0 0 6px rgba(100,255,230,.85))
      drop-shadow(0 0 16px rgba(60,220,220,.6))
      drop-shadow(0 0 28px rgba(0,180,200,.35));
  }
}

/* Owoc — ciepła czerwień */
@keyframes gc-glow-fruit {
  0%,100% {
    filter: brightness(1.05)
      drop-shadow(0 0 3px rgba(255,80,80,.5))
      drop-shadow(0 0 8px rgba(220,40,40,.25));
  }
  50% {
    filter: brightness(1.3)
      drop-shadow(0 0 6px rgba(255,120,100,.85))
      drop-shadow(0 0 16px rgba(255,60,60,.6))
      drop-shadow(0 0 28px rgba(220,20,20,.35));
  }
}

/* ── ACTIVE ELEMENT (placement) ── */
.gc-active-el {
  position: absolute; cursor: grab; transform-origin: center center;
  pointer-events: all; touch-action: none; z-index: 30;
  filter: drop-shadow(0 0 10px rgba(255,220,80,1)) drop-shadow(0 0 24px rgba(255,180,0,.8));
  animation: gc-glow-placement 1.4s ease-in-out infinite;
}
.gc-active-el:active { cursor: grabbing; }
@keyframes gc-glow-placement {
  0%,100% { filter: drop-shadow(0 0 8px rgba(255,220,80,.9)) drop-shadow(0 0 20px rgba(255,180,0,.6)); }
  50%      { filter: drop-shadow(0 0 14px rgba(255,240,120,1)) drop-shadow(0 0 32px rgba(255,200,50,.85)) drop-shadow(0 0 50px rgba(255,160,0,.5)); }
}

/* ── TRANSFORM HANDLES ── */
.gc-handles { position: absolute; pointer-events: none; z-index: 31; transform-origin: center center; }
.gc-handle-border {
  position: absolute; inset: 0;
  border: 2px dashed rgba(255,220,80,.8); border-radius: 6px; pointer-events: none;
}
.gc-handle-rot-line {
  position: absolute; left: 50%; top: -26px; width: 2px; height: 26px;
  background: rgba(255,220,80,.7); transform: translateX(-50%); pointer-events: none;
}
.gc-handle { position: absolute; width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255,255,255,.9); pointer-events: all; touch-action: none; z-index: 32; }
.gc-handle-rot { top:-38px; left:50%; transform:translateX(-50%); background:#FFD700; cursor:crosshair; }
.gc-handle-sc { background: rgba(255,255,255,.95); border-radius: 3px; width: 14px; height: 14px; }
.gc-h-tl { top:-7px;  left:-7px;  cursor:nw-resize; }
.gc-h-tr { top:-7px;  right:-7px; cursor:ne-resize; }
.gc-h-bl { bottom:-7px; left:-7px;  cursor:sw-resize; }
.gc-h-br { bottom:-7px; right:-7px; cursor:se-resize; }

/* ── SAVE BAR ── */
.gc-save-bar {
  position: absolute; bottom: 0; left: 0; right: 0;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 20px;
  background: rgba(0,0,0,.65); backdrop-filter: blur(8px);
  border-top: 1px solid rgba(255,255,255,.1); z-index: 50;
}
.gc-save-hint { color: rgba(255,255,255,.6); font-size: .82rem; flex: 1; }

/* ── TOOLTIP ── */
.gc-tooltip {
  position: absolute; max-width: 220px; padding: 10px 13px;
  background: rgba(10,20,10,.92); border: 1px solid rgba(76,175,80,.35);
  border-radius: 10px; pointer-events: none; z-index: 40;
  box-shadow: 0 4px 20px rgba(0,0,0,.5);
}
.gc-tip-name { font-weight: 700; color: #a5d6a7; font-size: .85rem; margin-bottom: 4px; }
.gc-tip-text { color: rgba(255,255,255,.8); font-size: .82rem; line-height: 1.4; }

/* ── FOOTER ── */
.gc-footer {
  flex-shrink: 0; display: flex; align-items: center; gap: 16px; padding: 10px 18px;
  background: rgba(0,0,0,.4); border-top: 1px solid rgba(255,255,255,.07);
}
.gc-count { color: rgba(255,255,255,.45); font-size: .8rem; }

/* ── BUTTONS ── */
.gc-btn-primary {
  padding: 9px 22px; border-radius: 22px; background: #2e7d32; color: #fff;
  border: none; cursor: pointer; font-size: .88rem; font-weight: 600; transition: background .15s;
}
.gc-btn-primary:hover { background: #388e3c; }
.gc-btn-ghost {
  padding: 9px 18px; border-radius: 22px; background: rgba(255,255,255,.1);
  color: rgba(255,255,255,.75); border: 1px solid rgba(255,255,255,.2); cursor: pointer; font-size: .88rem; transition: background .15s;
}
.gc-btn-ghost:hover { background: rgba(255,255,255,.18); }
.gc-btn-gold {
  padding: 9px 22px; border-radius: 22px;
  background: linear-gradient(135deg,#FFD700,#FFA000); color: #1a1a00;
  border: none; cursor: pointer; font-size: .88rem; font-weight: 700;
  box-shadow: 0 2px 12px rgba(255,180,0,.5); transition: filter .15s;
}
.gc-btn-gold:hover { filter: brightness(1.1); }
.gc-btn-gold:disabled { opacity: .5; cursor: not-allowed; filter: none; }

/* ── PANELS ── */
.gc-panel {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.6); backdrop-filter: blur(6px); z-index: 60;
  overflow-y: auto; padding: 20px;
}
.gc-panel-box {
  background: #fff; border-radius: 14px; padding: 28px 30px;
  width: 100%; max-width: 480px; max-height: 90vh; overflow-y: auto;
}
.gc-panel-title { font-size: 1.15rem; font-weight: 700; color: #1b5e20; margin-bottom: 6px; }
.gc-panel-sub   { color: #666; font-size: .85rem; margin-bottom: 18px; line-height: 1.5; }
.gc-panel-nav   { display: flex; justify-content: space-between; align-items: center; margin-top: 20px; gap: 10px; }
.gc-center      { text-align: center; }
.gc-success-icon { font-size: 3rem; margin-bottom: 12px; }

/* ── FORM ── */
.gc-hp { position: absolute; opacity: 0; pointer-events: none; height: 0; overflow: hidden; }
.gc-field { margin-bottom: 14px; }
.gc-field label { display: block; font-weight: 600; font-size: .84rem; margin-bottom: 5px; color: #333; }
.gc-field input, .gc-field textarea {
  width: 100%; padding: 9px 12px; border: 1.5px solid #ddd; border-radius: 8px;
  font-size: .9rem; font-family: inherit; transition: border-color .15s;
}
.gc-field input:focus, .gc-field textarea:focus { border-color: #4CAF50; outline: none; box-shadow: 0 0 0 3px rgba(76,175,80,.15); }
.gc-field textarea { resize: vertical; min-height: 90px; }
.gc-req { color: #e53935; }
.gc-opt { color: #aaa; font-weight: 400; font-size: .78rem; }
.gc-char { color: #aaa; font-size: .75rem; font-weight: 400; float: right; }
.gc-err { background: #ffebee; color: #c62828; border-radius: 7px; padding: 10px 13px; font-size: .84rem; margin-bottom: 12px; }

/* ── TYPE GRID ── */
.gc-type-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(80px,1fr)); gap: 8px; margin-bottom: 16px; }
.gc-type-btn {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  padding: 10px 6px; border-radius: 10px; border: 2px solid #eee;
  background: #f9f9f9; cursor: pointer; transition: all .15s; font-size: .75rem; color: #444;
}
.gc-type-btn:hover { border-color: #a5d6a7; background: #f0faf0; }
.gc-type-btn.active { border-color: #4CAF50; background: #e8f5e9; color: #1b5e20; }

/* ── SWATCHES ── */
.gc-color-row { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.gc-color-row label { font-size: .8rem; color: #555; font-weight: 600; white-space: nowrap; }
.gc-swatches { display: flex; gap: 5px; flex-wrap: wrap; }
.gc-swatch {
  width: 24px; height: 24px; border-radius: 50%; border: 2px solid transparent;
  cursor: pointer; transition: transform .12s, border-color .12s;
  box-shadow: 0 1px 4px rgba(0,0,0,.2);
}
.gc-swatch:hover { transform: scale(1.2); }
.gc-swatch.active { border-color: #333; transform: scale(1.15); }

/* ── VARIANTS ── */
.gc-variant-row { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.gc-variant-row label { font-size: .8rem; color: #555; font-weight: 600; }
.gc-variants { display: flex; gap: 6px; flex-wrap: wrap; }
.gc-var-btn { padding: 4px; border-radius: 8px; border: 2px solid #eee; background: #f9f9f9; cursor: pointer; transition: all .15s; }
.gc-var-btn:hover { border-color: #a5d6a7; }
.gc-var-btn.active { border-color: #4CAF50; background: #e8f5e9; }

/* ── PREVIEW BOX ── */
.gc-el-preview-box {
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg,#e8f5e9,#f0faf0);
  border-radius: 12px; border: 1px solid #c8e6c9; padding: 16px; margin: 12px 0;
}
