.schoolforms {
  --sf-accent: #9c2a28;
  --sf-accent-dark: #7d211f;
  --sf-border: #c7ccd1;
  --sf-border-strong: #767676;
  --sf-muted: #5d646b;
  --sf-bg: #fff;
  --sf-soft: #f6f7f8;
  --sf-focus: #0b78c6;
  --sf-success: #3f8f53;
  --sf-success-dark: #28663a;
  max-width: 920px;
  margin: 1.75rem auto;
  color: inherit;
}

.schoolforms * { box-sizing: border-box; }
.schoolforms > h1 { margin: 0 0 .9rem; line-height: 1.18; }
.schoolforms-intro { margin: 0 0 1.6rem; line-height: 1.65; }

.schoolforms-card {
  width: 100%;
  margin: 1.25rem 0;
  padding: clamp(1.25rem, 3vw, 2rem);
  background: var(--sf-bg);
  border: 1px solid var(--sf-border);
  border-radius: 10px;
}

.schoolforms-card-head { margin-bottom: 1.35rem; }
.schoolforms-card-head h2 { margin: 0 0 .45rem; line-height: 1.25; }
.schoolforms-card-head p { margin: 0; line-height: 1.55; color: var(--sf-muted); }

.sf-group { display: block; width: 100%; margin: 0 0 1.25rem; }
.sf-group > label,
.sf-group legend {
  display: block;
  width: 100%;
  margin: 0 0 .45rem;
  padding: 0;
  font-weight: 700;
  line-height: 1.35;
}
.sf-required { color: #a51f18; }

.schoolforms .sf-control,
.schoolforms input.sf-control,
.schoolforms textarea.sf-control,
.schoolforms select.sf-control {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  min-height: 48px;
  margin: 0 !important;
  padding: .72rem .85rem !important;
  border: 1px solid var(--sf-border-strong) !important;
  border-radius: 6px !important;
  background: #fff !important;
  color: #202124 !important;
  box-shadow: none !important;
  font: inherit !important;
  font-size: 1rem !important;
  line-height: 1.4 !important;
}
.schoolforms textarea.sf-control { min-height: 140px; resize: vertical; }
.schoolforms select.sf-control { padding-right: 2.4rem !important; }
.schoolforms .sf-control:hover { border-color: #4e545a !important; }
.schoolforms .sf-control:focus,
.schoolforms input:focus,
.schoolforms textarea:focus,
.schoolforms select:focus,
.schoolforms button:focus-visible {
  outline: 3px solid var(--sf-focus) !important;
  outline-offset: 2px !important;
  border-color: var(--sf-focus) !important;
}

.sf-help { margin-top: .42rem; color: var(--sf-muted); font-size: .94rem; line-height: 1.45; }
.sf-check { display: flex !important; align-items: flex-start; gap: .65rem; font-weight: 400 !important; }
.sf-check input { flex: 0 0 auto; width: 21px; height: 21px; margin: .1rem 0 0; }
.schoolforms fieldset { margin: 0; padding: 0; border: 0; }
.sf-hp { position: absolute !important; left: -10000px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }

.sf-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: .4rem; }
.schoolforms .sf-button {
  min-height: 46px;
  padding: .75rem 1.3rem;
  border: 1px solid var(--sf-accent);
  border-radius: 6px;
  background: var(--sf-accent);
  color: #fff;
  font: inherit;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
}
.schoolforms .sf-button:hover { background: var(--sf-accent-dark); border-color: var(--sf-accent-dark); color: #fff; }

.sf-section { margin: 2rem 0 1rem; padding-bottom: .55rem; border-bottom: 1px solid var(--sf-border); }
.sf-info { margin: 1rem 0 1.3rem; padding: .9rem 1rem; border-left: 5px solid var(--sf-accent); background: #fff4df; line-height: 1.55; }
.sf-captcha { overflow: visible; }

/* Frontendowy odpowiednik komunikatu Atum: nie jest modalem i nie zasłania formularza. */
.sf-alert {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) 54px;
  align-items: stretch;
  width: 100%;
  min-height: 68px;
  margin: 0 0 1.35rem;
  border-radius: 4px;
  overflow: hidden;
  color: #fff;
  background: var(--sf-success);
}
.sf-alert[hidden] { display: none !important; }
.sf-alert-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 68px;
  background: var(--sf-success-dark);
  font-size: 1.45rem;
  font-weight: 700;
}
.sf-alert-icon span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border: 3px solid currentColor;
  border-radius: 50%;
  font-size: .82rem;
  line-height: 1;
}
.sf-alert-content {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .35rem;
  min-width: 0;
  padding: 1rem 1.2rem;
  font-size: 1.05rem;
  line-height: 1.45;
}
.sf-alert-content strong { font-weight: 700; }
.sf-alert-close {
  align-self: stretch;
  width: 54px;
  min-height: 54px;
  padding: 0;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: #fff !important;
  font-size: 2rem !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  cursor: pointer;
}
.sf-alert-close:hover { background: rgba(0,0,0,.12) !important; }
.sf-alert-info { background: #3178a8; }
.sf-alert-info .sf-alert-icon { background: #22587d; }

@media (max-width: 575px) {
  .schoolforms { margin: 1rem 0; }
  .schoolforms-card { padding: 1rem; border-radius: 7px; }
  .sf-alert { grid-template-columns: 52px minmax(0,1fr) 48px; min-height: 64px; }
  .sf-alert-icon { min-height: 64px; }
  .sf-alert-content { padding: .85rem .9rem; font-size: 1rem; }
  .sf-alert-close { width: 48px; }
  .sf-actions .sf-button { width: 100%; }
}

/* 2.1.5 — spójne komunikaty formularza właściwego. */
.schoolforms .sf-alert-success { background: var(--sf-success); }
.schoolforms .sf-alert-success .sf-alert-icon { background: var(--sf-success-dark); }
.schoolforms .sf-alert-warning { background: #b66a12; }
.schoolforms .sf-alert-warning .sf-alert-icon { background: #8f5008; }
.schoolforms .sf-alert-error { background: #b3261e; }
.schoolforms .sf-alert-error .sf-alert-icon { background: #7f1d18; }
.schoolforms .sf-alert-info { background: #3178a8; }
.schoolforms .sf-alert-info .sf-alert-icon { background: #22587d; }
.schoolforms .sf-alert-content span { white-space: normal; }
.schoolforms .sf-access-status {
  margin: .25rem 0 1rem;
  padding: .75rem .9rem;
  border-left: 4px solid #3178a8;
  background: #eef6fb;
  line-height: 1.45;
}
.schoolforms .sf-new-request,
.schoolforms .sf-mode-link { margin: 1rem 0 0; }
.schoolforms .sf-new-request a,
.schoolforms .sf-mode-link a { text-decoration: underline; text-underline-offset: 2px; }
