/* Asystent AgroEfekt – wszystkie style zamknięte w .aea-root, żeby nie wpływały na motyw. */
@font-face { font-family: "AEA Montserrat"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("fonts/montserrat-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "AEA Montserrat"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("fonts/montserrat-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

.aea-root, .aea-root * { box-sizing: border-box; }
.aea-root {
  /* Jeden kolor marki, bez gradientu */
  --aea-green: #2b7a4e; --aea-green-dark: #1f5e3b; --aea-g1: #1f5e3b; --aea-g2: #2b7a4e; --aea-g3: #2b7a4e;
  --aea-gold: #f2d21b; --aea-ink: #1b2a22; --aea-muted: #5f6d65; --aea-bg: #ffffff; --aea-canvas: #ffffff;
  --aea-bubble: #f3f5f4; --aea-line: #dfe5e1; --aea-focus: #2b7a4e;
  position: fixed; right: 24px; bottom: 24px; z-index: 2147483000;
  font: 15px/1.5 "AEA Montserrat", Montserrat, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--aea-ink); -webkit-font-smoothing: antialiased;
}
.aea-root [hidden] { display: none !important; }
.aea-root button, .aea-root input, .aea-root textarea, .aea-root select { font-family: inherit; }
.aea-root :focus-visible { outline: 2px solid var(--aea-focus); outline-offset: 2px; }

/* Przycisk otwierający */
.aea-launch { display: flex; align-items: center; gap: 10px; border: 0; border-radius: 999px; padding: 6px 20px 6px 6px; background: var(--aea-green); color: #fff; font-size: 15px; font-weight: 600; letter-spacing: .01em; cursor: pointer; box-shadow: 0 8px 22px rgba(31, 94, 59, .35); transition: transform .15s ease, box-shadow .15s ease; }
.aea-launch:hover { transform: translateY(-1px); box-shadow: 0 12px 28px rgba(31, 94, 59, .42); }
.aea-launch-ico { display: block; width: 40px; height: 40px; border-radius: 50%; overflow: hidden; background: #e4efe7; border: 2px solid #fff; }
.aea-launch-ico img { display: block; width: 100%; height: 100%; }
.aea-launch-ico svg { width: 20px; height: 20px; margin: 8px; }

/* Panel */
.aea-panel { position: relative; width: 420px; max-width: calc(100vw - 24px); height: 680px; max-height: calc(100vh - 48px); background: var(--aea-bg); border-radius: 12px; box-shadow: 0 24px 60px rgba(10, 30, 20, .28); display: flex; flex-direction: column; overflow: hidden; }
.aea-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px 14px 20px; background: var(--aea-green); color: #fff; }
.aea-brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.aea-logo { display: flex; align-items: center; flex: none; }
.aea-logo img { display: block; height: 46px; width: auto; }
.aea-wordmark { font-weight: 700; font-size: 14px; letter-spacing: .04em; white-space: nowrap; color: #fff; }
.aea-wordmark b { color: #fff; font-weight: 700; }
.aea-head-sub { font-size: 12.5px; font-weight: 500; line-height: 1.35; white-space: nowrap; opacity: .92; }
.aea-head-sub b { display: block; font-size: 17px; font-weight: 700; opacity: 1; letter-spacing: .01em; }
.aea-head-sub i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #7be0a1; margin-right: 6px; vertical-align: 1px; font-style: normal; }
.aea-x { flex: none; display: grid; place-items: center; width: 46px; height: 46px; border: 0; border-radius: 50%; background: #fff; color: var(--aea-green); cursor: pointer; }
.aea-x svg { width: 20px; height: 20px; }

.aea-log { flex: 1; overflow-y: auto; padding: 10px 18px 8px; display: flex; flex-direction: column; gap: 6px; background: #fff; }
.aea-day { align-self: center; font-size: 14px; font-weight: 500; color: var(--aea-ink); background: #fff; border-radius: 12px; padding: 4px 14px; box-shadow: 0 1px 6px rgba(0,0,0,.12); margin: 0 0 4px; }
.aea-sep { align-self: center; font-size: 14px; font-weight: 500; color: var(--aea-ink); margin: 14px 0 6px; }
.aea-who { font-size: 12.5px; font-weight: 500; color: var(--aea-ink); margin: 8px 0 2px 38px; }
.aea-msg { position: relative; max-width: 84%; padding: 11px 14px 22px; border-radius: 6px; word-wrap: break-word; line-height: 1.5; }
.aea-msg a { color: var(--aea-g2); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.aea-time { position: absolute; right: 12px; bottom: 5px; font-size: 11px; font-weight: 500; opacity: .75; }
.aea-assistant { align-self: flex-start; margin-left: 38px; background: var(--aea-bubble); }
.aea-assistant.aea-last::before { content: ""; position: absolute; left: -38px; bottom: 0; width: 30px; height: 30px; border-radius: 50%; background: #e4efe7 no-repeat center/100% url("bronek-avatar.svg"); box-shadow: 0 1px 3px rgba(0,0,0,.15); }
.aea-user { align-self: flex-end; background: var(--aea-green); color: #fff; margin-top: 8px; }
.aea-user a { color: #fff; }
.aea-error { background: #fff4f1; color: #8a2a12; }
.aea-typing { padding: 14px 16px; }
.aea-typing span { display: inline-block; width: 7px; height: 7px; margin: 0 2px; border-radius: 50%; background: var(--aea-g3); animation: aea-b 1s infinite ease-in-out; }
.aea-typing span:nth-child(2) { animation-delay: .15s; } .aea-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes aea-b { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-2px); } }
@media (prefers-reduced-motion: reduce) { .aea-typing span { animation: none; opacity: .7; } .aea-launch { transition: none; } }
.aea-inline-lead { display: block; margin-top: 10px; border: 0; border-radius: 4px; padding: 9px 14px; background: var(--aea-green); color: #fff; font-size: 14px; font-weight: 600; cursor: pointer; }

/* Karta informacyjna */
.aea-info { display: flex; gap: 12px; align-items: flex-start; margin: 6px 0 6px; padding: 16px 18px; border-radius: 4px; background: #f3f6f4; color: var(--aea-ink); }
.aea-info svg { flex: none; width: 22px; height: 22px; color: var(--aea-ink); margin-top: 1px; }
.aea-info strong { display: block; font-size: 14px; font-weight: 700; color: var(--aea-ink); margin-bottom: 5px; }
.aea-info p { margin: 0; font-size: 13px; color: #34453b; }
.aea-info a { color: var(--aea-g2); font-weight: 600; }

.aea-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 18px 0; background: #fff; }
.aea-chip { border: 1px solid var(--aea-green); background: #fff; color: var(--aea-green); border-radius: 999px; padding: 6px 13px; font-size: 13px; font-weight: 500; cursor: pointer; transition: background .15s ease; }
.aea-chip:hover { background: #edf4ef; }

.aea-actions { display: flex; gap: 8px; padding: 10px 18px 0; background: #fff; }
.aea-call, .aea-lead-btn { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 12.5px; font-weight: 600; border-radius: 4px; padding: 9px 8px; text-decoration: none; cursor: pointer; line-height: 1.2; text-align: center; }
.aea-call { background: #fff; border: 1px solid var(--aea-green); color: var(--aea-green); }
.aea-call svg { width: 15px; height: 15px; flex: none; }
.aea-lead-btn { background: var(--aea-green); border: 0; color: #fff; }

.aea-input { display: flex; align-items: flex-end; gap: 8px; margin: 0; padding: 12px 18px 14px; background: #fff; }
.aea-field { flex: 1; display: flex; align-items: flex-end; background: #fff; border: 1px solid #a9b6ae; border-radius: 4px; padding: 3px 3px 3px 14px; transition: border-color .15s ease, box-shadow .15s ease; }
.aea-field:focus-within { border-color: var(--aea-green); box-shadow: 0 0 0 2px rgba(43, 122, 78, .18); }
.aea-root .aea-input textarea:focus-visible { outline: 0; }
.aea-input textarea { flex: 1; resize: none; border: 0; outline: 0; padding: 9px 0; font-size: 15px; min-height: 40px; max-height: 120px; color: var(--aea-ink); background: transparent; }
.aea-input button { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 4px; background: var(--aea-green); color: #fff; cursor: pointer; }
.aea-input button svg { width: 18px; height: 18px; }
.aea-foot { font-size: 11px; color: var(--aea-muted); text-align: center; padding: 0 18px 10px; background: #fff; }
.aea-foot a { color: var(--aea-muted); }

/* Formularz kontaktowy */
.aea-form { position: absolute; inset: 0; top: 76px; background: #fff; overflow-y: auto; padding: 20px 20px 24px; }
.aea-lead h3 { margin: 0 0 4px; font-size: 18px; font-weight: 700; color: var(--aea-g1); }
.aea-lead label { display: block; font-size: 13px; font-weight: 600; margin: 12px 0 0; }
.aea-lead input:not([type=checkbox]), .aea-lead select, .aea-lead textarea { display: block; width: 100%; margin-top: 5px; padding: 10px 12px; border: 1px solid #cfd9d2; border-radius: 10px; font-size: 15px; font-weight: 400; background: #fff; color: var(--aea-ink); }
.aea-lead input:focus, .aea-lead select:focus, .aea-lead textarea:focus { outline: 0; border-color: var(--aea-g3); box-shadow: 0 0 0 3px rgba(43, 122, 78, .15); }
.aea-lead .aea-check { display: flex; gap: 10px; font-weight: 500; align-items: flex-start; font-size: 13px; }
.aea-lead .aea-check input { margin-top: 3px; accent-color: var(--aea-g2); width: 16px; height: 16px; flex: none; }
.aea-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; }
.aea-small { font-size: 11.5px; color: var(--aea-muted); margin: 8px 0; line-height: 1.45; }
.aea-small a { color: var(--aea-g2); }
.aea-err { color: #8a2a12; font-size: 13px; min-height: 18px; margin-top: 6px; }
.aea-row { display: flex; gap: 8px; margin-top: 10px; }
.aea-back, .aea-submit { flex: 1; padding: 12px; border-radius: 4px; font-size: 14px; font-weight: 600; cursor: pointer; }
.aea-back { background: #fff; border: 1px solid #cfd9d2; color: var(--aea-ink); }
.aea-submit { background: var(--aea-green); border: 0; color: #fff; }
.aea-submit:disabled { opacity: .6; }
.aea-ok { padding: 24px 4px; font-size: 15px; }
.aea-ok strong { color: var(--aea-g1); }
.aea-ok .aea-back { margin-top: 16px; width: 100%; }

@media (max-width: 480px) {
  .aea-root { right: 10px; bottom: 10px; }
  .aea-panel { width: calc(100vw - 20px); height: calc(100vh - 20px); border-radius: 14px; }
  .aea-logo img { display: block; height: 46px; width: auto; }
}

.aea-lead textarea { resize: vertical; font-family: inherit; line-height: 1.4; }
