/* ============================================================
   DIT Forms – Frontend styles
   ============================================================ */

.dit-form-wrap {
    max-width: 720px;
    margin: 0 auto;
}

/* ── Układ pól ──────────────────────────────────────────────── */
.dit-form-fields {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    margin: 0 -10px;
}

.dit-field-wrap {
    box-sizing: border-box;
    padding: 0 10px 18px;
}

/* ── Etykiety ────────────────────────────────────────────────── */
.dit-label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 14px;
    color: #1d2327;
}

.dit-required {
    color: #cc0000;
    margin-left: 2px;
}

/* ── Inputy ──────────────────────────────────────────────────── */
.dit-input {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 10px 14px;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    font-size: 15px;
    font-family: inherit;
    color: #1d2327;
    background: #fff;
    transition: border-color .15s;
    -webkit-appearance: none;
    appearance: none;
}

.dit-input:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 2px rgba(34,113,177,.25);
}

.dit-input.dit-error {
    border-color: #cc0000;
}

textarea.dit-input {
    resize: vertical;
    min-height: 110px;
}

/* ── Checkbox ─────────────────────────────────────────────────── */
.dit-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    color: #555;
    cursor: pointer;
    line-height: 1.5;
}

.dit-checkbox {
    flex-shrink: 0;
    margin-top: 2px;
    width: 17px;
    height: 17px;
    accent-color: #e4612c;
    cursor: pointer;
}

/* ── Przycisk wysyłania ──────────────────────────────────────── */
.dit-form-submit {
    margin-top: 8px;
    padding: 0 10px;
}

.dit-btn-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #e4612c;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 12px 32px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s, opacity .15s;
    font-family: inherit;
}

.dit-btn-submit:hover {
    background: #c85524;
}

.dit-btn-submit:disabled {
    opacity: .6;
    cursor: not-allowed;
}

.dit-btn-full {
    width: 100%;
    justify-content: center;
}

.dit-btn-80 {
    width: 80%;
}

.dit-btn-50 {
    width: 50%;
}

/* ── Spinner ─────────────────────────────────────────────────── */
.dit-btn-spinner {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: dit-spin .7s linear infinite;
}

.dit-btn-submit.is-loading .dit-btn-spinner { display: inline-block; }
.dit-btn-submit.is-loading .dit-btn-text    { opacity: .7; }

@keyframes dit-spin { to { transform: rotate(360deg); } }

/* ── Komunikaty ──────────────────────────────────────────────── */
.dit-form-messages {
    padding: 0 10px;
    margin-bottom: 6px;
}

.dit-msg {
    padding: 12px 16px;
    border-radius: 4px;
    font-size: 15px;
    margin-bottom: 10px;
}

.dit-msg-success {
    background: #edfaed;
    border: 1px solid #46a94c;
    color: #1d4421;
}

.dit-msg-error {
    background: #fdf1f1;
    border: 1px solid #cc0000;
    color: #6a0a0a;
}

/* ── Błędy pól ───────────────────────────────────────────────── */
.dit-field-error {
    display: block;
    color: #cc0000;
    font-size: 12px;
    margin-top: 4px;
}

/* ── Responsywność ───────────────────────────────────────────── */
@media ( max-width: 640px ) {
    .dit-field-wrap {
        width: 100% !important;
    }
    .dit-btn-submit {
        width: 100%;
        justify-content: center;
    }
}
