/* =========================================================
   KONFIGURATOR PŁOTKI
========================================================= */

/* =========================
   GŁÓWNY TYTUŁ
========================= */
body#product .kp-an-main-title {
  margin: 14px 0 12px;
  font-size: 21px;
  font-weight: 700;
  line-height: 1.3;
  color: #1f2937;
}

/* =========================
   BOX INFORMACYJNY – KOMPAKT
========================= */
body#product .kp-an-info-box {
  margin: 0 0 12px;
  padding: 10px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #f9fafb;
}

body#product .kp-an-info-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #374151;
}

body#product .kp-an-info-row strong {
  font-weight: 600;
}

body#product .kp-an-height {
  font-weight: 700;
  color: #111827;
}

/* =========================
   INPUT + BUTTONY KROKU 1
========================= */
body#product .kp-an-input-row {
  display: flex;
  align-items: stretch;
  gap: 10px;
  flex-wrap: nowrap;
}

body#product input[name="an_pf_name[37]"] {
  flex: 0 1 260px;
  width: 260px;
  max-width: 260px;
  min-height: 46px;
  height: 46px;
  padding: 0 14px;
  margin: 0;
  border: 1px solid #cfd8e3;
  border-radius: 10px;
  background: #fff;
  font-size: 16px;
  line-height: normal;
  color: #111827;
  box-sizing: border-box;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background-color 0.2s ease;
}

body#product input[name="an_pf_name[37]"]::placeholder {
  color: #8a8f98;
  opacity: 1;
}

body#product input[name="an_pf_name[37]"]:focus {
  border-color: #8b5cf6;
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.12);
  outline: none;
}

body#product input[name="an_pf_name[37]"].is-locked {
  background: #f3f4f6;
  border-color: #d1d5db;
  color: #4b5563;
  cursor: default;
}

body#product .kp-an-input-actions {
  display: flex;
  align-items: stretch;
  align-self: stretch;
  gap: 10px;
  flex: 0 0 auto;
  margin-top: 0 !important;
}

/* =========================
   BUTTONY
========================= */
body#product .kp-an-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  height: 46px;
  margin: 0;
  padding: 0 16px;
  border-radius: 10px;
  border: 1px solid #d1d5db;
  background: #fff;
  color: #111827;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  box-sizing: border-box;
  cursor: pointer;
  white-space: nowrap;
  transition:
    border-color 0.2s ease,
    background-color 0.2s ease,
    opacity 0.2s ease,
    transform 0.2s ease;
}

body#product .kp-an-btn-secondary:hover {
  opacity: 0.96;
}

body#product .kp-an-btn-secondary:active {
  transform: translateY(1px);
}

/* CZARNY – ZATWIERDŹ WYMIAR */
body#product .kp-an-btn-confirm-width {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  height: 46px;
  margin: 0;
  padding: 0 18px;
  border: 1px solid #111827 !important;
  border-radius: 10px;
  background: #111827 !important;
  color: #ffffff !important;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  box-sizing: border-box;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: none;
}

body#product .kp-an-btn-confirm-width:hover {
  background: #000000 !important;
  border-color: #000000 !important;
  color: #ffffff !important;
  opacity: 1;
}

body#product .kp-an-btn-confirm-width:focus,
body#product .kp-an-btn-confirm-width:active {
  background: #111827 !important;
  border-color: #111827 !important;
  color: #ffffff !important;
  outline: none;
}

body#product .kp-an-btn-edit-width {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  height: 46px;
  white-space: nowrap;
}

/* =========================
   ETYKIETY
========================= */
body#product .an-pf-field-label-title {
  display: inline-block;
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 6px;
  line-height: 1.35;
  color: #1f2937;
}

/* =========================
   MARSZCZENIE
========================= */
body#product input[name="an_pf_name[38]"] {
  margin-right: 8px;
  accent-color: #111827;
}

body#product .an-pf-field label {
  font-weight: 500;
  cursor: pointer;
}

/* =========================
   KOMUNIKATY
========================= */
body#product .kp-an-message {
  display: none;
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.45;
}

body#product .kp-an-message.is-info {
  display: block;
  background: #eff6ff;
  color: #1e40af;
}

body#product .kp-an-message.is-error {
  display: block;
  background: #fef2f2;
  color: #991b1b;
}

/* =========================
   WYNIK
========================= */
body#product .kp-an-result {
  margin: 14px 0;
  padding: 14px;
  border-radius: 12px;
  background: #f1f5f9;
  border: 1px solid #dbeafe;
  opacity: 0;
  transform: translateY(6px);
  transition:
    opacity 0.35s ease,
    transform 0.35s ease;
}

body#product .kp-an-result.is-visible {
  opacity: 1;
  transform: translateY(0);
}

body#product .kp-an-result.is-hiding {
  opacity: 0;
  transform: translateY(4px);
  transition:
    opacity 0.15s ease,
    transform 0.15s ease;
}

body#product .kp-an-result-line {
  margin-top: 6px;
  color: #1f2937;
  line-height: 1.5;
}

body#product .kp-an-result-line-2 {
  font-size: 20px;
  font-weight: 800;
  color: #111827;
}

body#product .kp-an-result-line-5 {
  font-weight: 700;
  color: #1e3a8a;
}

body#product .kp-an-result.is-updated {
  animation: kpFlash 0.3s ease;
}

@keyframes kpFlash {
  0% { background: #e0f2fe; }
  100% { background: #f1f5f9; }
}

/* =========================
   KROK 3 – POJAWIANIE
========================= */
body#product .kp-an-step3-wrap {
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity 0.35s ease,
    transform 0.35s ease;
}

body#product .kp-an-step3-wrap.is-visible {
  opacity: 1;
  transform: translateY(0);
}

body#product .kp-an-step3-wrap.is-hiding {
  opacity: 0;
  transform: translateY(4px);
  transition:
    opacity 0.15s ease,
    transform 0.15s ease;
}

body#product .kp-an-step3-height-info {
  margin-bottom: 12px;
  padding: 12px 14px;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  background: #eff6ff;
  color: #1e3a8a;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.45;
}

body#product .kp-an-step3-email-info {
  margin-top: 16px;
  margin-bottom: 12px;
  padding: 12px 14px;
  border: 1px solid #fcd34d;
  border-radius: 10px;
  background: #fffbeb;
  color: #b45309;
  font-size: 14px;
  line-height: 1.45;
}

/* =========================
   WIADOMOŚĆ
========================= */
body#product textarea[name="an_pf_name[39]"],
body#product input[name="an_pf_name[39]"] {
  width: 100%;
  max-width: 480px;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid #cfd8e3;
}

body#product textarea[name="an_pf_name[39]"] {
  min-height: 90px;
}

body#product textarea[name="an_pf_name[39]"]:focus,
body#product input[name="an_pf_name[39]"]:focus {
  border-color: #8b5cf6;
  outline: none;
}

/* =========================
   MOBILE
========================= */
@media (max-width: 768px) {
  body#product .kp-an-input-row {
    flex-direction: column;
    align-items: stretch;
  }

  body#product .kp-an-input-actions {
    width: 100%;
    flex-direction: column;
    align-self: stretch;
  }

  body#product input[name="an_pf_name[37]"] {
    max-width: 100%;
    width: 100%;
    flex: 1 1 100%;
  }

  body#product .kp-an-btn-secondary,
  body#product .kp-an-btn-confirm-width,
  body#product .kp-an-btn-edit-width {
    width: 100%;
  }
}