/* 🔒 style_modal.css
   Stylowanie nakładki/modalu logowania z magicznym słowem oraz przycisku zmiany wariantu:
   – efekt szkła (glassmorphism),
   – zamazanie tła (backdrop-filter),
   – blokada tła podczas logowania,
   – responsywny formularz wprowadzania słowa.
*/

/* Blokada obowiązuje już od pierwszego renderu HTML, także przed startem JS. */
html.login-open,
html.login-open body {
  overflow: hidden;
}
html.login-open body {
  margin: 0;
}
html.login-open body > :not(#modalLogowania) {
  display: none !important;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  height: 100dvh;
  box-sizing: border-box;
  padding: 16px;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  background-image: linear-gradient(rgba(15, 23, 42, 0.4), rgba(15, 23, 42, 0.65)), url("../Front_image.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  z-index: 10000;

}

.modal-box {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 20px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
  box-sizing: border-box;
  flex: 0 0 auto;
  width: 100%;
  max-width: 502px;
  margin: auto;
  padding: 36px 30px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.6);
}

.modal-box h3 {
  margin-top: 0;
  margin-bottom: 8px;
  font-size: 1.5em;
  color: #1e293b;
}

.modal-box p {
  color: #64748b;
  font-size: 0.95em;
  margin-bottom: 24px;
}

.modal-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.modal-form input[type="text"] {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 16px;
  font-size: 1.1em;
  border: 2px solid #cbd5e1;
  border-radius: 8px;
  text-align: center;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.modal-form input[type="text"]:focus {
  border-color: var(--kolor-wariantu, #217f90);
  box-shadow: 0 0 0 3px rgba(33, 127, 144, 0.15);
}

.modal-btn {
  background-color: var(--kolor-wariantu, #217f90);
  color: #ffffff;
  border: none;
  padding: 12px 20px;
  font-size: 1.05em;
  font-weight: bold;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.1s ease;
}

.modal-btn:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.modal-error {
  color: #dc2626;
  font-size: 0.9em;
  margin-top: 4px;
  display: none;
  font-weight: 500;
}

/* Przycisk statusu wariantu w nagłówku */
.btn-wariant-badge {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 20px;
  padding: 4px 14px;
  font-size: 0.85em;
  color: #334155;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 12px;
}

.btn-wariant-badge:hover {
  background: #e2e8f0;
  border-color: #94a3b8;
}

/* 🔒 Dyskretna informacja o braku cookies i sesji lokalnej w modalu */
.modal-privacy-note {
  margin-top: 22px;
  padding-top: 14px;
  border-top: 1px solid rgba(203, 213, 225, 0.7);
  font-size: 0.82em;
  color: #64748b;
  line-height: 1.4;
  user-select: none;
}

.modal-privacy-sub {
  font-size: 0.9em;
  color: #94a3b8;
}

/* Wąski ekran i klawiatura: karta mieści się w szerokości, modal przewija się pionowo. */
@media (max-width: 540px) {
  .modal-box { padding: 24px 18px; }
}
