/* ============================================================
   Rozbudowany formularz elementor — Frontend CSS  v1.6
   ============================================================ */

/* ── Grid wrapper ──────────────────────────────────────── */
.eic-choices-wrapper {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    width: 100%;
    margin: 0;
    padding: 0;
}

/* ── Card — default: column (image on top) ─────────────── */
.eic-choice-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    cursor: pointer;
    user-select: none;
    position: relative;
    box-sizing: border-box;
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-style: solid;
    border-radius: 8px;
    padding: 16px;
    transition: background-color .2s ease, border-color .2s ease, box-shadow .2s ease;
}

/* ── Row layout — triggered by Elementor prefix_class ──── */
/* When user picks "Po lewej", Elementor adds class eic-layout-row to wrapper */
.eic-layout-row .eic-choice-card {
    flex-direction: row !important;
    align-items: center !important;
    text-align: left !important;
}

.eic-layout-row .eic-choice-image {
    margin-bottom: 0 !important;
    margin-right: 12px;
    flex-shrink: 0;
}

.eic-layout-row .eic-choice-text {
    text-align: left;
    align-items: flex-start;
}

/* ── Hover ─────────────────────────────────────────────── */
.eic-choice-card:hover {
    background-color: #f8f9ff;
    border-color: #b0bef5;
    box-shadow: 0 2px 8px rgba(74,108,247,.08);
}

/* ── Selected ──────────────────────────────────────────── */
.eic-choice-card.is-selected {
    background-color: #f0f4ff;
    border-color: #4A6CF7;
    border-width: 2px;
    box-shadow: 0 2px 12px rgba(74,108,247,.15);
}

/* ── Checkmark badge — real <span> element ─────────────── */
/* Hidden by default, shown on .is-selected via flex          */
.eic-checkmark {
    display: none;
    position: absolute;
    top: 8px;
    right: 8px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background-color: #4A6CF7;
    color: #ffffff;          /* SVG uses stroke="currentColor" → picks this up */
    align-items: center;
    justify-content: center;
    pointer-events: none;
    flex-shrink: 0;
    line-height: 0;
}

.eic-checkmark svg {
    width: 13px;
    height: 13px;
    display: block;
    overflow: visible;
}

.eic-choice-card.is-selected .eic-checkmark {
    display: flex;
}

/* ── Hidden native input ───────────────────────────────── */
.eic-choice-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 0;
    height: 0;
}

/* ── Image wrapper ─────────────────────────────────────── */
.eic-choice-image {
    display: block;
    line-height: 0;
    flex-shrink: 0;
    margin-bottom: 10px;
}

.eic-choice-image img {
    width: 56px;
    height: 56px;
    object-fit: contain;
    border-radius: 4px;
    display: block;
}

/* ── Text group ────────────────────────────────────────── */
.eic-choice-text {
    display: flex;
    flex-direction: column;
}

/* ── Option label ──────────────────────────────────────── */
.eic-choice-label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    color: #1a1a2e;
    line-height: 1.3;
    margin-bottom: 4px;
}

.eic-choice-card.is-selected .eic-choice-label {
    color: #4A6CF7;
}

/* ── Option description ────────────────────────────────── */
.eic-choice-desc {
    display: block;
    font-size: 12px;
    color: #777e90;
    line-height: 1.4;
}

/* ── Responsive fallbacks ──────────────────────────────── */
@media (max-width: 1024px) {
    .eic-choices-wrapper {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .eic-choices-wrapper {
        grid-template-columns: 1fr;
    }
}
