/*
 * Cooperation request form (the popup opened from the homepage's Cooperation Request section).
 * Used by index.html and FA/index.html; [dir="rtl"] mirrors it.
 */

/* Keeps space for the scrollbar at all times, so the page doesn't jump sideways
   when the form opens and page scrolling is switched off. */
html { scrollbar-gutter: stable; }
html.coop-open { overflow: hidden; }

.coop-dialog .coop-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 28px;
  border: 2px solid var(--coop-signal, #e3e208);
  background: var(--coop-signal, #e3e208);
  color: #000;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}
.coop-dialog .coop-btn:focus-visible, .coop-ghost:focus-visible, .coop-x:focus-visible { outline: 3px solid #e3e208; outline-offset: 3px; }
.coop-dialog .coop-btn[disabled] { opacity: .6; cursor: progress; }

/* ---------- the form window ---------- */
.coop-dialog {
  --coop-ink: #000;
  --coop-signal: #e3e208;
  --coop-line: #d5d9de;
  --coop-graphite: #5d6672;
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, .62);
}
.coop-dialog.is-open { display: flex; }
.coop-panel {
  position: relative;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  width: min(860px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  background: #fff;
  color: #1e2329;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .45);
  text-align: start;
}
.coop-side {
  background: var(--coop-ink);
  color: #fff;
  padding: 40px 32px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  border-inline-start: 6px solid var(--coop-signal);
}
.coop-side h2 { color: #fff; font-size: 26px; font-weight: 700; line-height: 1.3; margin: 0; }
[dir="rtl"] .coop-side h2 { font-family: inherit; line-height: 1.6; }
.coop-side p { color: rgba(255, 255, 255, .74); font-size: 15px; line-height: 1.75; margin: 0; }
.coop-side ul { list-style: none; padding: 0; margin: auto 0 0; font-size: 14px; color: rgba(255, 255, 255, .6); line-height: 1.9; }
.coop-side ul li::before { content: ''; display: inline-block; width: 8px; height: 8px; background: var(--coop-signal); margin-inline-end: 10px; }

.coop-form { padding: 40px 36px 32px; display: flex; flex-direction: column; gap: 20px; }
.coop-field label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; color: #1e2329; }
.coop-field input[type="text"],
.coop-field input[type="tel"] {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--coop-line);
  border-radius: 0;
  font-size: 16px;
  font-family: inherit;
  background: #fff;
  color: #1e2329;
}
.coop-field input:focus { outline: none; border-color: #000; box-shadow: inset 0 -3px 0 var(--coop-signal); }
.coop-field input[type="tel"] { direction: ltr; text-align: start; }
[dir="rtl"] .coop-field input[type="tel"] { text-align: right; }

/* file picker: the whole box is the button */
.coop-drop {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 84px;
  padding: 14px 16px;
  border: 1px dashed #9aa3ad;
  background: #f6f7f8;
  cursor: pointer;
}
.coop-drop:hover, .coop-drop.is-over { border-color: #000; background: #fbfbe6; }
.coop-drop input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.coop-drop:focus-within { border-style: solid; border-color: #000; box-shadow: inset 0 -3px 0 var(--coop-signal); }
.coop-drop-icon {
  flex: 0 0 auto;
  width: 40px; height: 48px;
  border: 2px solid #1e2329;
  position: relative;
  background: #fff;
}
.coop-drop-icon::after { content: ''; position: absolute; inset-inline-end: -2px; top: -2px; width: 14px; height: 14px; background: #f6f7f8; border-inline-start: 2px solid #1e2329; border-bottom: 2px solid #1e2329; }
.coop-drop.has-file .coop-drop-icon { background: var(--coop-signal); }
.coop-drop-text strong { display: block; font-size: 15px; color: #1e2329; overflow-wrap: anywhere; }
.coop-drop-text span { display: block; font-size: 13px; color: var(--coop-graphite); margin-top: 2px; }

.coop-msg { margin: 0; padding: 12px 14px; font-size: 14px; line-height: 1.6; display: none; }
.coop-msg.is-error { display: block; background: #fdecec; color: #8a1414; border-inline-start: 4px solid #c62828; }
.coop-msg.is-ok { display: block; background: #f3f6d9; color: #2f3a00; border-inline-start: 4px solid #8a9a00; }

.coop-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 4px; }
.coop-ghost {
  min-height: 48px;
  padding: 12px 22px;
  border: 1px solid var(--coop-line);
  background: #fff;
  color: #1e2329;
  font-size: 15px;
  font-family: inherit;
  cursor: pointer;
}
.coop-ghost:hover { border-color: #000; }
.coop-dialog .coop-btn:hover { background: #000; border-color: #000; color: var(--coop-signal); }

.coop-x {
  position: absolute;
  top: 10px;
  inset-inline-end: 10px;
  width: 40px; height: 40px;
  border: 0;
  background: transparent;
  font-size: 28px;
  line-height: 1;
  color: #1e2329;
  cursor: pointer;
}

/* phones: the form becomes a full-height sheet */
@media (max-width: 720px) {
  .coop-dialog { padding: 0; align-items: stretch; }
  .coop-panel { grid-template-columns: 1fr; grid-template-rows: auto 1fr; align-content: start; max-height: 100vh; height: 100%; width: 100%; }
  .coop-side { padding: 28px 24px 22px; border-inline-start: 0; border-top: 6px solid var(--coop-signal); }
  .coop-side ul { display: none; }
  .coop-x { color: #fff; }
  .coop-form { padding: 24px; }
}
@media (prefers-reduced-motion: no-preference) {
  .coop-dialog.is-open .coop-panel { animation: coop-in .22s ease-out; }
  @keyframes coop-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
}
