/*
 * Generator Stron AI — kontakt.css
 * Rozszerza home.css o style formularza kontaktowego.
 * Wymaga załadowania home.css jako bazowy arkusz.
 */

/* ============================================================
   LAYOUT STRONY KONTAKTOWEJ
   ============================================================ */
.contact-main {
  padding-block: var(--sp-16) var(--sp-16);
}

.contact-header {
  max-width: 44rem;
  margin-inline: auto;
  text-align: center;
  margin-bottom: var(--sp-12);
}

.contact-title {
  font-size: clamp(var(--text-3xl), 4vw, var(--text-4xl));
  font-weight: 800;
  color: var(--grey-900);
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: var(--sp-4);
}

.contact-sub {
  font-size: var(--text-lg);
  color: var(--grey-500);
  line-height: 1.7;
}

.contact-layout {
  display: grid;
  grid-template-columns: 1fr 20rem;
  gap: var(--sp-12);
  align-items: start;
  max-width: 56rem;
  margin-inline: auto;
}

.contact-section-title {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--grey-900);
  letter-spacing: -0.02em;
  margin-bottom: var(--sp-6);
  padding-bottom: var(--sp-4);
  border-bottom: 1.5px solid var(--grey-200);
}

/* ============================================================
   FORMULARZ KONTAKTOWY
   ============================================================ */
.contact-form-wrap {
  background: var(--white);
  border: 1.5px solid var(--grey-200);
  border-radius: var(--r-xl);
  padding: var(--sp-8);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
}

/* Pole formularza */
.cf-field {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.cf-label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--grey-700);
}

.cf-required {
  color: var(--error);
  margin-left: var(--sp-1);
}

.cf-optional {
  font-size: var(--text-xs);
  font-weight: 400;
  color: var(--grey-400);
  margin-left: var(--sp-2);
}

/* Input / Textarea */
.cf-input {
  width: 100%;
  padding: var(--sp-3);
  font-size: var(--text-sm);
  font-family: var(--font);
  color: var(--grey-900);
  background: var(--white);
  border: 1.5px solid var(--grey-300);
  border-radius: var(--r-sm);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  min-height: 44px;        /* WCAG 2.5.8 */
}
.cf-input::placeholder    { color: var(--grey-400); }
.cf-input:hover           { border-color: var(--grey-400); }
.cf-input:focus           {
  border-color: var(--blue-600);
  box-shadow: 0 0 0 3px rgb(37 99 235 / .18);
}
.cf-input[aria-invalid="true"] {
  border-color: var(--error);
  box-shadow: 0 0 0 3px rgb(185 28 28 / .12);
}

.cf-textarea {
  min-height: 7.5rem;
  resize: vertical;
  line-height: 1.6;
}

/* Błąd pola */
.cf-error {
  display: block;
  min-height: 1.1rem;
  font-size: var(--text-xs);
  color: var(--error);
  line-height: 1.4;
}

/* Checkbox zgody */
.cf-field--check { gap: var(--sp-2); }

.cf-checkbox-row {
  display: flex;
  gap: var(--sp-3);
  align-items: flex-start;
}

.cf-checkbox {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-top: 2px;
  accent-color: var(--blue-700);
  cursor: pointer;
}
.cf-checkbox:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
  border-radius: 2px;
}

.cf-check-label {
  font-size: var(--text-sm);
  color: var(--grey-700);
  line-height: 1.6;
  cursor: pointer;
}

.cf-link {
  color: var(--blue-700);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.cf-link:hover { color: var(--blue-800); }

/* Nota o polach obowiązkowych */
.cf-required-note {
  font-size: var(--text-xs);
  color: var(--grey-400);
  margin-top: calc(-1 * var(--sp-2));
}

/* Globalny błąd */
.cf-global-error {
  padding: var(--sp-3) var(--sp-4);
  background: rgb(185 28 28 / .06);
  border: 1px solid rgb(185 28 28 / .3);
  border-radius: var(--r-sm);
  font-size: var(--text-sm);
  color: var(--error);
  line-height: 1.5;
}
.cf-global-error[hidden] { display: none; }

/* Przycisk submit */
.cf-submit { width: 100%; }

/* Sukces */
.cf-success {
  text-align: center;
  padding: var(--sp-12) var(--sp-8);
}
.cf-success[hidden] { display: none; }

.cf-success-title {
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--grey-900);
  margin-bottom: var(--sp-3);
}

.cf-success-text {
  font-size: var(--text-base);
  color: var(--grey-500);
  line-height: 1.7;
}

/* ============================================================
   PANEL BOCZNY — DANE KONTAKTOWE
   ============================================================ */
.contact-info {
  background: var(--grey-50);
  border: 1.5px solid var(--grey-200);
  border-radius: var(--r-xl);
  padding: var(--sp-8);
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
  margin-bottom: var(--sp-8);
}

.contact-detail-item { display: flex; flex-direction: column; gap: var(--sp-1); }

.contact-detail-label {
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--blue-700);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.contact-detail-value {
  font-size: var(--text-sm);
  color: var(--grey-700);
  line-height: 1.5;
}

/* Outline button (back) */
.btn--outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding-inline: var(--sp-5);
  font-size: var(--text-sm);
  font-weight: 600;
  font-family: var(--font);
  color: var(--blue-700);
  background: transparent;
  border: 1.5px solid var(--blue-600);
  border-radius: var(--r-sm);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  width: 100%;
}
.btn--outline:hover        { background: var(--blue-50); }
.btn--outline:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

/* ============================================================
   RWD
   ============================================================ */
@media (max-width: 860px) {
  .contact-layout {
    grid-template-columns: 1fr;
    max-width: 36rem;
  }
  .contact-info { order: -1; }
}

@media (max-width: 640px) {
  .contact-main { padding-block: var(--sp-10); }
  .contact-form-wrap { padding: var(--sp-5); }
  .contact-info { padding: var(--sp-5); }
}
