/*
 * MODUŁ STYLÓW: COMPOSER.CSS
 * Upload, przełączniki możliwości, pole wpisywania i stopka.
 * Kolejność modułów jest zapisana w index.html i chroni istniejącą kaskadę.
 */

.composer{
  padding:0 24px 24px;
  flex-shrink:0;
}

.dropzone-row{margin-bottom:10px}
.dropzone{
  width:100%;
  border:1px dashed rgba(110,168,255,.35);
  border-radius:18px;
  padding:14px 16px;
  background:rgba(255,255,255,.03);
  color:var(--text);
  text-align:left;
  cursor:pointer;
}
.dropzone.dragover{
  background:rgba(110,168,255,.08);
  border-color:rgba(110,168,255,.65);
}
.dropzone-title{font-weight:800}
.dropzone-sub{font-size:12px;color:var(--muted);margin-top:3px}

.composer-options{
  display:flex;
  flex-wrap:wrap;
  gap:7px;
  margin-bottom:9px;
}
.composer-options:empty{display:none}
.composer-option-chip{
  display:inline-flex;
  align-items:center;
  gap:7px;
  padding:6px 9px;
  border:1px solid rgba(110,168,255,.28);
  border-radius:999px;
  background:rgba(110,168,255,.11);
  color:#d7e6ff;
  font-size:11px;
  font-weight:800;
  cursor:pointer;
}
.composer-option-chip::after{content:"×";font-size:14px;color:#9fb5dd}

.attachments{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-bottom:12px;
}

.composer-capabilities{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  flex-wrap:wrap;
  gap:9px;
  margin:0 0 9px;
}
.search-mode-toggle{
  min-height:46px;
  display:inline-grid;
  grid-template-columns:auto auto auto;
  align-items:center;
  gap:8px;
  padding:7px 9px 7px 11px;
  border:1px solid rgba(148,163,184,.26);
  border-radius:16px;
  color:#aebbd5;
  background:rgba(14,22,39,.72);
  backdrop-filter:blur(14px);
  -webkit-backdrop-filter:blur(14px);
  font:inherit;
  text-align:left;
  cursor:pointer;
  transition:.2s ease;
}
.search-mode-toggle:hover{
  color:#e9f3ff;
  border-color:rgba(110,168,255,.58);
  background:rgba(34,65,109,.55);
  transform:translateY(-1px);
}
.search-mode-toggle.active,
.search-mode-toggle[aria-pressed="true"]{
  color:#d9eaff;
  border-color:rgba(110,168,255,.62);
  background:rgba(40,91,162,.35);
  box-shadow:0 8px 22px rgba(43,94,176,.16),inset 0 1px 0 rgba(255,255,255,.07);
}
.search-mode-icon{font-size:17px;line-height:1}
.search-mode-copy{display:flex;flex-direction:column;gap:1px;min-width:78px}
.search-mode-copy strong{font-size:12px;line-height:1.2}
.search-mode-copy small{font-size:10px;color:#91a2bf}
.search-mode-toggle.active .search-mode-copy small{color:#d5e7ff}
.search-switch-track{
  position:relative;
  width:36px;
  height:21px;
  border-radius:999px;
  background:rgba(148,163,184,.32);
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.08);
  transition:.2s ease;
}
.search-switch-knob{
  position:absolute;
  left:3px;
  top:3px;
  width:15px;
  height:15px;
  border-radius:50%;
  background:#d5deec;
  box-shadow:0 2px 7px rgba(0,0,0,.32);
  transition:.2s ease;
}
.search-mode-toggle.active .search-switch-track{background:#6ea8ff}
.search-mode-toggle.active .search-switch-knob{transform:translateX(15px);background:#fff}

.agent-mode-row{
  position:relative;
  display:flex;
  justify-content:flex-end;
  margin:0 0 0 auto;
}
.agent-mode-toggle{
  min-height:46px;
  display:inline-grid;
  grid-template-columns:auto auto auto;
  align-items:center;
  gap:9px;
  padding:7px 9px 7px 12px;
  border:1px solid rgba(91,220,186,.3);
  border-radius:16px;
  color:#b9f6e8;
  background:rgba(14,46,48,.78);
  backdrop-filter:blur(16px);
  -webkit-backdrop-filter:blur(16px);
  font:inherit;
  text-align:left;
  cursor:pointer;
  transition:.2s ease;
}
.agent-mode-toggle:hover{
  color:#ecfffa;
  border-color:rgba(91,220,186,.62);
  background:rgba(28,86,78,.78);
  transform:translateY(-1px);
}
.agent-mode-toggle.active,
.agent-mode-toggle[aria-pressed="true"]{
  color:#f2fffc;
  border-color:rgba(91,220,186,.82);
  background:linear-gradient(135deg,rgba(30,171,139,.38),rgba(72,118,219,.25));
  box-shadow:0 8px 22px rgba(26,145,120,.18),inset 0 1px 0 rgba(255,255,255,.08);
}
.agent-mode-toggle:disabled{opacity:.42;cursor:not-allowed;transform:none}
.agent-mode-icon{font-size:17px}
.agent-mode-copy{display:flex;flex-direction:column;gap:1px;min-width:108px}
.agent-mode-copy strong{font-size:12px;line-height:1.2}
.agent-mode-copy small{font-size:10px;color:#8fbeb5}
.agent-mode-toggle.active .agent-mode-copy small{color:#d8fff5}
.agent-switch-track{
  position:relative;
  width:36px;
  height:21px;
  border-radius:999px;
  background:rgba(148,163,184,.32);
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.08);
  transition:.2s ease;
}
.agent-switch-knob{
  position:absolute;
  left:3px;
  top:3px;
  width:15px;
  height:15px;
  border-radius:50%;
  background:#d5deec;
  box-shadow:0 2px 7px rgba(0,0,0,.32);
  transition:.2s ease;
}
.agent-mode-toggle.active .agent-switch-track{background:#2dd4a7}
.agent-mode-toggle.active .agent-switch-knob{transform:translateX(15px);background:#fff}
.agent-coachmark{
  position:absolute;
  right:0;
  bottom:calc(100% + 10px);
  z-index:15;
  width:min(360px,calc(100vw - 36px));
  display:grid;
  grid-template-columns:1fr auto;
  gap:12px;
  align-items:start;
  padding:13px 13px 12px 15px;
  border:1px solid rgba(110,168,255,.42);
  border-radius:16px;
  color:#eaf2ff;
  background:rgba(12,19,36,.97);
  box-shadow:0 16px 36px rgba(2,6,23,.45);
  animation:coachmark-in .2s ease-out;
}
.agent-coachmark::after{
  content:"";
  position:absolute;
  right:28px;
  bottom:-6px;
  width:11px;
  height:11px;
  border-right:1px solid rgba(110,168,255,.42);
  border-bottom:1px solid rgba(110,168,255,.42);
  background:#0c1324;
  transform:rotate(45deg);
}
.agent-coachmark-copy{display:flex;flex-direction:column;gap:4px;font-size:11px;line-height:1.45}
.agent-coachmark-copy strong{font-size:12px;color:#fff}
.agent-coachmark-copy span{color:#aebbd5}
.agent-coachmark-dismiss{
  min-width:36px;
  height:28px;
  border:1px solid rgba(110,168,255,.35);
  border-radius:9px;
  color:#dbeafe;
  background:rgba(110,168,255,.12);
  font:inherit;
  font-size:10px;
  font-weight:800;
  cursor:pointer;
}
.agent-coachmark-dismiss:hover{background:rgba(110,168,255,.23)}
@keyframes coachmark-in{from{opacity:0;transform:translateY(5px)}to{opacity:1;transform:translateY(0)}}
.attach-chip{
  display:flex;
  align-items:center;
  gap:10px;
  padding:8px 10px;
  border-radius:16px;
  background:rgba(255,255,255,.04);
  border:1px solid var(--line);
}
.attach-preview{
  width:44px;height:44px;border-radius:12px;overflow:hidden;display:grid;place-items:center;background:#0d1324;color:var(--muted);font-weight:800;font-size:12px;
}
.attach-preview img,.attach-preview video{width:100%;height:100%;object-fit:cover}
.attach-meta{display:flex;flex-direction:column;gap:2px}
.attach-name{font-size:13px;font-weight:700;max-width:240px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.attach-state{font-size:11px;color:var(--muted)}
.attach-remove{
  width:28px;height:28px;border-radius:999px;border:none;background:rgba(255,255,255,.08);color:#fff;cursor:pointer;
}
.attach-remove:hover{background:rgba(239,68,68,.3)}

.composer-box{
  display:flex;
  align-items:flex-end;
  gap:12px;
  border:1px solid var(--line);
  border-radius:24px;
  background:rgba(14,20,38,.68);
  backdrop-filter:blur(18px);
  -webkit-backdrop-filter:blur(18px);
  padding:12px;
  box-shadow:var(--shadow);
}

.icon-btn,.send-btn{
  width:48px;height:48px;border-radius:16px;
  display:grid;place-items:center;
  background:rgba(255,255,255,.06);
  color:#fff;
  padding:0;
}

.icon-svg{
  width:22px;
  height:22px;
  display:block;
  pointer-events:none;
}

.icon-btn:hover{background:rgba(255,255,255,.1)}
.send-btn{
  background:linear-gradient(135deg,var(--accent),var(--accent-2));
  font-weight:900;
  box-shadow:0 12px 26px rgba(110,168,255,.24);
}
.send-btn:disabled{opacity:.55;cursor:not-allowed}
.send-btn.is-stop{
  width:76px;
  grid-auto-flow:column;
  grid-template-columns:auto auto;
  gap:7px;
  border-radius:16px;
  background:linear-gradient(135deg,#b91c1c,#ef4444);
  box-shadow:0 12px 26px rgba(239,68,68,.2);
  font-size:12px;
}
.send-stop-icon{font-size:11px}
#chat-input{
  flex:1;
  min-height:48px;
  max-height:220px;
  resize:none;
  border:none;
  outline:none;
  background:transparent;
  color:var(--text);
  padding:12px 2px;
  line-height:1.55;
}
.composer-footer{
  display:grid;
  justify-items:center;
  gap:2px;
  margin:8px auto 0;
  max-width:940px;
  text-align:center;
}
.composer-trust{
  color:#7f8eae;
  font-size:10px;
  line-height:1.45;
}
.composer-privacy-line{
  color:#8999b8;
  font-size:10px;
  line-height:1.45;
}
.privacy-link{
  margin:0;
  padding:0;
  border:0;
  color:#b8caec;
  background:transparent;
  font:inherit;
  font-weight:800;
  text-decoration:underline;
  text-underline-offset:2px;
  cursor:pointer;
}
.privacy-link:hover{color:#e5efff}
.app-credit{
  color:#94a6c9;
  font-size:10px;
  font-weight:700;
  letter-spacing:.015em;
  text-align:center;
}

