/*
 * rodo.css — klauzule zgód RODO renderowane pod formularzami
 * (atfpro_rodo_render_consents). Globalny, używany na froncie wszędzie gdzie
 * pojawiają się zgody (modal zapytania, rejestracja, kontakt, reklamacja).
 * Kolory przez zmienne --theme-* (dark/light) z fallbackami.
 */

.atfpro-rodo-consents {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 4px 0;
}

.atfpro-rodo-consent {
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 2px;
    transition: border-color 0.15s ease, background 0.15s ease;
}

/* Podwójna klasa — wyższa specyficzność niż `.atfpro-quote-modal label`
   (które narzuca display:block i wypychałoby checkbox nad tekst w modalu). */
.atfpro-rodo-consent .atfpro-rodo-consent__label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0;
    font-size: 12.5px;
    font-weight: 400;
    line-height: 1.5;
    color: var(--theme-text-secondary, #495057);
    cursor: pointer;
}

.atfpro-rodo-consent__label input[type="checkbox"] {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--button-apple-blue, #0071e3);
    cursor: pointer;
}

/* Zwinięta treść — ~3 linie, reszta po „Rozwiń". flex:1 + min-width:0 pozwala
   tekstowi wypełnić wiersz obok checkboxa i poprawnie się przyciąć (line-clamp). */
.atfpro-rodo-consent__text {
    display: block;
    flex: 1 1 auto;
    min-width: 0;
}

.atfpro-rodo-consent__text.is-collapsed,
.atfpro-rodo-info__text.is-collapsed {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.atfpro-rodo-consent__text a,
.atfpro-rodo-info__text a {
    color: var(--color-link, #3b82f6);
    text-decoration: underline;
}

/* Klauzula informacyjna (RODO art. 13) — statyczny tekst BEZ checkboxa,
   prezentowany mniejszą czcionką, wyraźnie odróżniony od zgód do zaznaczenia. */
.atfpro-rodo-info {
    border-left: 2px solid var(--theme-border, rgba(255, 255, 255, 0.12));
    padding: 2px 0 2px 12px;
    margin: 2px 0;
}

.atfpro-rodo-info__text {
    display: block;
    font-size: 12px;
    line-height: 1.55;
    color: var(--theme-text-secondary, #6b7280);
}

.atfpro-rodo-consent__text .required {
    color: var(--theme-error, #ef4444);
}

.atfpro-rodo-consent__toggle,
.atfpro-rodo-info__toggle {
    margin: 4px 0 0 28px;
    padding: 0;
    border: none;
    background: none;
    color: var(--color-link, #3b82f6);
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
}

/* Blok info nie ma checkboxa — toggle bez wcięcia pod checkbox. */
.atfpro-rodo-info__toggle {
    margin-left: 0;
}

.atfpro-rodo-consent__toggle:hover,
.atfpro-rodo-consent__toggle:focus,
.atfpro-rodo-info__toggle:hover,
.atfpro-rodo-info__toggle:focus {
    color: var(--color-link-hover, #0056b3);
    outline: none;
    background-color: transparent;
}

/* Stan błędu (wymagana zgoda niezaznaczona) — czerwona obwódka wokół klauzuli. */
.atfpro-rodo-consent.has-error {
    border-color: var(--theme-error, #ef4444);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
    padding: 10px;
}

.atfpro-rodo-consent .atfpro-quote-field-error,
.atfpro-rodo-consent__error {
    margin: 6px 0 0 28px;
    font-size: 13px;
    line-height: 1.4;
    color: var(--theme-error, #ef4444);
}
