/* ========================================
   mod_wokanda – wokanda.css
   Kompatybilny z Joomla 4 / 5 / 6
   ======================================== */

.mod-wokanda {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    color: #333;
    font-size: 15px;
    line-height: 1.5;
}

/* ---------- Formularz ---------- */
.wokanda-formularz {
    margin-bottom: 28px;
    width: 100%;
}

.wokanda-pola {
    display: grid;
    grid-template-columns: minmax(180px, 0.75fr) minmax(180px, 0.75fr) minmax(260px, 1.5fr);
    gap: 16px;
    width: 100%;
    max-width: none;
    margin-bottom: 18px;
}

.wokanda-pole {
    display: flex;
    flex-direction: column;
}

.wokanda-pole label {
    font-weight: 700;
    font-size: 15px;
    margin-bottom: 6px;
    color: #333;
}

.wokanda-pole select,
.wokanda-pole input[type="text"] {
    box-sizing: border-box;
    width: 100%;
    height: 48px;
    min-height: 48px;
    padding: 0 12px;
    border: 1px solid #c5c9d0;
    border-radius: 4px;
    font-size: 15px;
    line-height: normal;
    font-family: inherit;
    background: #fff;
    color: #333;
    transition: border-color 0.2s, box-shadow 0.2s;
    appearance: none;
    -webkit-appearance: none;
}

.wokanda-pole select {
    padding-right: 40px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px 12px;
}

.wokanda-pole input[type="text"] {
    padding-right: 12px;
}

/* Ujednolicenie wyglądu pól wyboru z formularzem Joomla.
   Zapobiega przycinaniu tekstu w pionie przez style szablonu. */
.wokanda-pole select option {
    line-height: normal;
}

.wokanda-pole select:focus,
.wokanda-pole input[type="text"]:focus {
    outline: none;
    border-color: #2b6cb0;
    box-shadow: 0 0 0 3px rgba(43, 108, 176, 0.1);
}

.wokanda-pole input::placeholder {
    color: #9ca3af;
}

.wokanda-przycisk {
    display: inline-block;
    background: #1a365d;
    color: #fff;
    border: none;
    padding: 12px 28px;
    font-size: 14px;
    font-weight: 700;
    border-radius: 4px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    transition: background 0.2s;
}

.wokanda-przycisk:hover {
    background: #153050;
}

/* ---------- Komunikaty ---------- */
.wokanda-brak-danych,
.wokanda-brak-wynikow {
    padding: 20px;
    text-align: center;
    background: #f5f7fa;
    border-radius: 6px;
    color: #555;
    font-size: 15px;
    border: 1px solid #e1e4e8;
}

.wokanda-liczba {
    font-size: 18px;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 18px;
    padding: 4px 0;
}

/* ---------- Karty wyników ---------- */
.wokanda-lista {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.wokanda-karta {
    display: flex;
    background: #ffffff;
    border: 1px solid #d0d7de;
    border-radius: 0;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.wokanda-karta-pasek {
    width: 5px;
    background: #2b6cb0;
    flex-shrink: 0;
}

.wokanda-karta-tresc {
    padding: 20px 24px;
    flex: 1;
}

.wokanda-wiersz {
    display: flex;
    flex-wrap: wrap;
    gap: 20px 0;
    margin-bottom: 16px;
}

.wokanda-wiersz:last-child {
    margin-bottom: 0;
}

.wokanda-komorka {
    flex: 1 1 30%;
    min-width: 140px;
    display: flex;
    flex-direction: column;
}

.wokanda-etykieta {
    font-weight: 700;
    font-size: 15px;
    color: #2b6cb0;
    margin-bottom: 2px;
}

.wokanda-wartosc {
    font-size: 15px;
    line-height: 1.55;
    color: #1a202c;
    word-break: break-word;
}

.wokanda-wielolinia {
    white-space: pre-line;
}

/* ---------- Responsywność ---------- */
@media (max-width: 800px) {
    .wokanda-pola {
        grid-template-columns: 1fr 1fr;
    }

    .wokanda-pole:last-child {
        grid-column: 1 / -1;
    }
}

@media (max-width: 640px) {
    .wokanda-pola {
        grid-template-columns: 1fr;
    }

    .wokanda-pole:last-child {
        grid-column: auto;
    }

    .wokanda-przycisk {
        width: 100%;
    }

    .wokanda-komorka {
        flex: 1 1 100%;
    }

    .wokanda-karta-tresc {
        padding: 14px 16px;
    }


    .wokanda-etykieta {
        min-width: auto;
        margin-bottom: 2px;
        color: #777;
        font-size: 12px;
        text-transform: uppercase;
    }
}
