/* --- GLOBALNE USTAWIENIA --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f0f2f5;
    color: #333;
    padding: 20px;
    line-height: 1.6;
}

h1 {
    margin-bottom: 20px;
    color: #1a1a1a;
    text-align: center;
}

/* --- KONTENER I SEKCJE --- */
.container {
    background: #fff;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    max-width: 750px;
    margin: 20px auto;
}

h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 20px;
    text-align: left;
    color: #2c3e50;
    border-bottom: 2px solid #ecf0f1;
    padding-bottom: 8px;
}

.subsection-container {
    margin-bottom: 20px;
}

/* --- POLA FORMULARZA --- */
.form-group {
    margin-bottom: 15px;
    text-align: left;
    background: #fdfdfd;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #f0f0f0;
}

.wtf-label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    color: #555;
}

.wtf-form-field {
    width: 100%;
    padding: 12px;
    font-size: 15px;
    border: 1.5px solid #dcdde1;
    border-radius: 8px;
    outline: none;
    background: #fff;
    color: #2f3640;
    transition: all 0.2s ease-in-out;
}

.wtf-form-field:focus {
    border-color: #4CAF50;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.15);
}

textarea.wtf-form-field {
    resize: none;
    overflow: hidden; /* Dla mechanizmu auto-expand w JS */
    min-height: 42px;
}

/* --- POWIADOMIENIA I OSTRZEŻENIA --- */
.warning-paragraph {
    background: #fff3cd;
    border-left: 5px solid #ffc107;
    color: #856404;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    text-align: left;
    font-size: 0.95rem;
}

/* --- SEKACJA PODPISÓW (SIGNATURE PAD) --- */
.signatures-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 25px;
    justify-content: center;
    margin-top: 15px;
}

.signature-wrapper {
    text-align: center;
    flex: 1;
    min-width: 280px;
}

.signature-pad-container {
    position: relative;
    width: 100%;
    max-width: 400px;
    height: 180px; /* Wysokość dla komfortowego podpisu */
    border: 2px dashed #bdc3c7;
    background-color: #fafafa;
    border-radius: 10px;
    margin: 10px auto;
    /* touch-action: none jest kluczowe dla rysowania na mobile */
    touch-action: none;
    transition: border-color 0.3s ease;
}

.signature-pad-container:hover {
    border-color: #95a5a6;
}

.signature-pad-container canvas {
    width: 100% !important;
    height: 100% !important;
    cursor: url('https://img.icons8.com/ios-filled/20/000000/pen.png'), crosshair;
    border-radius: 10px;
}

/* --- PRZYCISKI --- */
.form-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 30px;
    margin-bottom: 50px;
}

.btn-submit, .btn-reset, .btn-clear {
    padding: 12px 28px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-submit {
    background: #27ae60;
    color: #fff;
    box-shadow: 0 4px 6px rgba(39, 174, 96, 0.2);
}

.btn-submit:hover {
    background: #219150;
    transform: translateY(-1px);
    box-shadow: 0 6px 12px rgba(39, 174, 96, 0.3);
}

.btn-reset {
    background: #e74c3c;
    color: #fff;
}

.btn-reset:hover {
    background: #c0392b;
}

.btn-clear {
    margin-top: 10px;
    background: #95a5a6;
    color: white;
    padding: 7px 15px;
    font-size: 13px;
}

.btn-clear:hover {
    background: #7f8c8d;
}

.btn-submit:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* --- RESPONSYWNOŚĆ --- */
@media (max-width: 768px) {
    body { padding: 10px; }
    .container { width: 100%; padding: 18px; }
    .btn-submit, .btn-reset { width: 100%; }
    .signature-wrapper { min-width: 100%; }
}

@media (max-width: 480px) {
    h3 { font-size: 1.1rem; }
    .form-group { padding: 8px; }
    .wtf-form-field { font-size: 14px; }
    .signature-pad-container { height: 160px; }
}

/* Status wiadomości po wysłaniu (dynamiczne kolory ustawiane przez JS) */
#status-message {
    transition: all 0.3s ease;
    font-weight: 500;
}

.signature-pad-container canvas {
    display: block; /* Usuwa zbędne marginesy pod canvas */
    width: 100% !important;
    height: 100% !important;
    touch-action: none; /* To już masz, jest kluczowe */
}