/* ===== OGÓLNE ===== */
body {
  font-family: Arial, sans-serif;
  background: #f5f7fa;
  padding: 20px;
  margin: 0;
}

/* ===== PANEL FORMULARZA ===== */
.form-panel {
  background: #ffffff;
  padding: 15px 20px;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.form-panel label {
  font-weight: bold;
  font-size: 14px;
  color: #333;
  display: flex;
  flex-direction: column;
}

.form-panel input {
  margin-top: 6px;
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid #ccc;
  font-size: 14px;
  min-width: 220px;
}

.form-panel input[readonly] {
  background: #f0f0f0;
}

/* ===== PRZYCISK PDF ===== */
.btn-pdf {
  background: #666F98;
  margin-left: 21px;
  color: white;
  border: none;
  padding: 12px 24px;
  font-size: 16px;
  font-weight: bold;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease;
}

.btn-pdf:hover {
  background: #2B324E;
  transform: translateY(-1px);
}

/* ===== CANVAS ===== */
canvas {
  display: block;
  margin: 0 auto;              /* 👈 wyśrodkowanie */
  border: 1px solid #ccc;
  background: #ffffff;
  cursor: crosshair;
}

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

.modal-box {
  background: #ffffff;
  padding: 20px 24px;
  border-radius: 12px;
  width: 340px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
  animation: modalFade 0.15s ease-out;
}

.modal-box h3 {
  margin: 0 0 12px;
  font-size: 18px;
  color: #333;
}

.modal-box label {
  display: flex;
  flex-direction: column;
  font-size: 14px;
  font-weight: bold;
  color: #333;
}

.modal-box input {
  margin-top: 6px;
  padding: 10px 12px;
  font-size: 15px;
  border-radius: 6px;
  border: 1px solid #ccc;
}

/* ===== PRZYCISKI MODALA ===== */
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

.btn-confirm {
  background: #666F98;
  color: white;
  border: none;
  padding: 8px 18px;
  font-size: 14px;
  font-weight: bold;
  border-radius: 6px;
  cursor: pointer;
}

.btn-confirm:hover {
  background: #2B324E;
}

.modal-actions .btn-delete {
  background-color: #c62828;
  color: #ffffff;
  border: none;
  padding: 8px 18px;
  font-size: 14px;
  font-weight: bold;
  border-radius: 6px;
  cursor: pointer;
}

.modal-actions .btn-delete:hover {
  background-color: #b71c1c;
}

.btn-cancel {
  background: #e0e0e0;
  color: #333;
  border: none;
  padding: 8px 18px;
  font-size: 14px;
  border-radius: 6px;
  cursor: pointer;
}

.btn-cancel:hover {
  background: #d0d0d0;
}

.hidden {
  display: none;
}

@keyframes modalFade {
  from {
    transform: translateY(10px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* ===== MODAL KOLOR ===== */
.color-options {
  display: flex;
  gap: 14px;
  justify-content: center;
  margin: 16px 0;
}

.color-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 3px solid transparent;
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.1s;
}

.color-btn:hover {
  transform: scale(1.05);
}

.color-btn.selected {
  border-color: #333;
  box-shadow: 0 0 0 3px rgba(0,0,0,0.15);
}

.color-btn.red    { background: #d32f2f; }
.color-btn.blue   { background: #1976d2; }
.color-btn.purple { background: #7b1fa2; }
.color-btn.green  { background: #388e3c; }


/* ===== LEGENDA ===== */
.legend-panel {
  background: #ffffff;
  border-radius: 10px;
  padding: 14px 20px;
  margin-bottom: 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
  font-size: 14px;
  color: #333;
}

.legend-panel h3 {
  margin: 0 0 10px 0;
  font-size: 15px;
  color: #222;
}

.legend-grid {
  display: grid;
  grid-template-columns: 1fr 2fr; /* zawsze 2 kolumny */
  gap: 10px 24px;
  align-items: start;
}

.legend-panel ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.legend-panel li {
  line-height: 1.5;
  margin: 4px 0;
}

.legend-panel strong {
  color: #1976d2;
}

/* opcjonalnie: na małych ekranach w jedną kolumnę */
@media (max-width: 700px) {
  .legend-grid {
    grid-template-columns: 1fr;
  }
}

.form-panel {
  background: #ffffff;
  padding: 15px 20px;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

/* ===== LOGO ===== */
.form-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  align-self: center;
}

.form-logo img {
  max-height: 62px;
  transform: scale(0.85);   /* 👈 optyczne zmniejszenie */
  transform-origin: left center;
}

/* STOPKA */
.site-footer {
    text-align: center;
    padding: 15px 10px;
    font-size: 13px;
    color: #777;
}

.site-footer a {
    color: #4A90E2;
    text-decoration: none;
}

.site-footer a:hover {
    text-decoration: underline;
}

.footer-link {
    text-decoration: none;
    color: inherit;
}

.footer-link:hover {
    text-decoration: underline; /* opcjonalnie */
}
