:root {
    --cf-brand: #c11f2a;
    --cf-bg: #f9f9f9;
    --cf-border: #e0e0e0;
    --cf-text: #333333;
    --cf-label: #888888;
    
    /* Trzy rodzaje zaokrągleń sterowane z Elementora */
    --cf-radius: 8px;        /* Zwykłe inputy */
    --cf-card-radius: 8px;   /* Kafelki i załączniki */
    --cf-label-radius: 4px;  /* Lewitujące etykiety */
    
    --cf-error: #d32f2f;
    --cf-success: #2e7d32;
}

.vis-cf-wrapper { width: 100%; font-family: inherit; }
.vis-cf-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.vis-col-100 { grid-column: span 2; }
.vis-col-50 { grid-column: span 1; }
@media (max-width: 768px) { .vis-cf-grid { grid-template-columns: 1fr; } .vis-col-50 { grid-column: span 2; } }

/* KONTENERY PÓL */
.vis-input-group { position: relative; display: flex; flex-direction: column; }

/* POLA TEKSTOWE I SELECT */
.vis-static-label { font-size: 14px; color: var(--cf-label); margin-bottom: 8px; font-weight: 500; }
.vis-input {
    width: 100%; padding: 18px 16px 12px; font-size: 15px; color: var(--cf-text);
    background-color: var(--cf-bg); border: 1px solid var(--cf-border);
    border-radius: var(--cf-radius); outline: none; transition: all 0.3s ease;
}
textarea.vis-input { min-height: 120px; resize: vertical; }
.vis-input:focus { border-color: var(--cf-brand); background-color: #fff; box-shadow: 0 0 0 4px rgba(193, 31, 42, 0.1); }
.vis-input.is-invalid { border-color: var(--cf-error); background-color: #fffafa; }

/* Custom Select */
.vis-select { appearance: none; padding: 14px 16px; cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; padding-right: 40px; }

/* LEWITUJĄCE ETYKIETY (Floating Labels) */
.vis-cf-label { position: absolute; left: 16px; top: 16px; font-size: 15px; color: var(--cf-label); pointer-events: none; transition: 0.2s cubic-bezier(0.25, 0.8, 0.25, 1); transform-origin: left top; background: transparent; margin: 0; line-height: 1; }
.vis-req { color: var(--cf-brand); }
.vis-input:focus ~ .vis-cf-label, .vis-input:not(:placeholder-shown) ~ .vis-cf-label { transform: translateY(-24px) scale(0.85); background-color: #fff; padding: 0 4px; left: 12px; top: 14px; color: var(--cf-brand); border-radius: var(--cf-label-radius); }
.vis-input.is-invalid ~ .vis-cf-label { color: var(--cf-error); }
.vis-input:focus ~ .vis-cf-label, 
.vis-input:not(:placeholder-shown) ~ .vis-cf-label,
.vis-input:-webkit-autofill ~ .vis-cf-label { 
    transform: translateY(-24px) scale(0.85); 
    background-color: #fff; 
    padding: 0 4px; 
    left: 12px; 
    top: 14px; 
    color: var(--cf-brand); 
    border-radius: var(--cf-label-radius); 
}

/* WSPÓLNY UKRYTY INPUT DLA KART, PLIKÓW I ZGÓD */
.vis-hidden-input { 
    width: 0.1px; 
    height: 0.1px; 
    opacity: 0; 
    overflow: hidden; 
    position: absolute; 
    z-index: -1; 
}

/* KAFELKI WYBORU (Premium Cards) */
.vis-cards-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.vis-cards-grid.is-invalid .vis-card-label { border-color: var(--cf-error); }
.vis-card-label {
    display: flex; align-items: center; justify-content: center; padding: 16px; text-align: center;
    border: 2px solid var(--cf-border); border-radius: var(--cf-card-radius); background: var(--cf-bg);
    cursor: pointer; transition: all 0.25s ease; color: var(--cf-text); font-weight: 500;
}
.vis-card-label:hover { border-color: var(--cf-brand); }
.vis-hidden-input:checked + .vis-card-label { background: var(--cf-brand); color: #fff; border-color: var(--cf-brand); box-shadow: 0 4px 15px rgba(193, 31, 42, 0.3); transform: translateY(-2px); }

/* KLASYCZNE CHECKBOXY I RADIO */
.vis-standard-list { display: flex; flex-direction: column; gap: 8px; }
.vis-standard-list .vis-card-label { display: flex; align-items: center; justify-content: flex-start; padding: 5px 0; border: none; background: transparent; color: var(--cf-text); transform: none !important; box-shadow: none !important; }
.vis-standard-list .vis-card-label:hover { border-color: transparent; }

/* Customowy kwadracik dla list i zgód */
.vis-custom-box { width: 22px; height: 22px; border: 2px solid var(--cf-border); border-radius: 4px; margin-right: 12px; display: inline-flex; align-items: center; justify-content: center; transition: 0.2s; flex-shrink: 0; }
.vis-hidden-input[type="radio"] + label .vis-custom-box { border-radius: 50%; }
.vis-hidden-input:checked + label { color: var(--cf-brand); }
.vis-hidden-input:checked + label .vis-custom-box { border-color: var(--cf-brand); background: var(--cf-brand); box-shadow: inset 0 0 0 4px #fff; }
.vis-custom-box.is-invalid { border-color: var(--cf-error); background: #fffafa; }

/* ZGODA (CONSENT) */
.vis-consent-wrapper { display: flex; align-items: flex-start; margin-top: 5px; }
.vis-consent-label { display: flex; align-items: flex-start; cursor: pointer; }
.vis-consent-text { font-size: 14px; color: var(--cf-label); line-height: 1.5; margin-top: 1px; }
.vis-consent-text a { color: var(--cf-brand); text-decoration: underline; }

/* ZAŁĄCZNIK (FILE) */
.vis-file-wrapper { position: relative; }
.vis-file-label {
    display: flex; align-items: center; justify-content: center; gap: 10px; padding: 20px;
    border: 2px dashed var(--cf-border); border-radius: var(--cf-card-radius); background: var(--cf-bg);
    cursor: pointer; color: var(--cf-label); transition: 0.2s; font-weight: 500; text-align: center;
}
.vis-file-label:hover { border-color: var(--cf-brand); color: var(--cf-brand); background: #fff; }
.vis-file-label.is-invalid { border-color: var(--cf-error); background-color: #fffafa; }

/* KOMUNIKATY O BŁĘDACH */
.vis-error-msg { display: none; color: var(--cf-error); font-size: 12px; margin-top: 6px; font-weight: 500; padding-left: 4px; }

/* PRZYCISK SUBMIT */
.vis-cf-footer { margin-top: 25px; display: flex; justify-content: flex-end; }
.vis-cf-submit {
    position: relative; display: inline-flex; align-items: center; justify-content: center;
    padding: 16px 36px; border: none; border-radius: var(--cf-radius); cursor: pointer; transition: all 0.3s ease; overflow: hidden; font-weight: 600;
}
.vis-cf-submit:hover { filter: brightness(1.1); transform: translateY(-2px); box-shadow: 0 4px 12px rgba(193,31,42,0.3); }
.vis-cf-submit:disabled { opacity: 0.7; cursor: not-allowed; transform: none; box-shadow: none; }

/* SPINNER */
.vis-spinner { display: none; width: 18px; height: 18px; border: 2px solid rgba(255,255,255,0.3); border-top-color: inherit; border-radius: 50%; margin-left: 10px; animation: spin 1s linear infinite; }
.vis-cf-form.is-loading .vis-spinner { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* GŁÓWNY KOMUNIKAT */
.vis-cf-global-msg { display: none; margin-top: 20px; padding: 15px; border-radius: var(--cf-radius); font-weight: 500; font-size: 15px; text-align: center; }
.vis-cf-global-msg.success { background-color: #e8f5e9; color: var(--cf-success); border: 1px solid #c8e6c9; }
.vis-cf-global-msg.error { background-color: #ffebee; color: var(--cf-error); border: 1px solid #ffcdd2; }

/* =========================================
   MULTI-STEP FORM
   ========================================= */

/* Pasek postępu */
.vis-cf-progress { margin-bottom: 30px; }
.vis-cf-progress-bar { width: 100%; height: 6px; background-color: var(--cf-border); border-radius: 10px; overflow: hidden; margin-bottom: 10px; }
.vis-cf-progress-fill { height: 100%; background-color: var(--cf-brand); width: 0%; transition: width 0.4s cubic-bezier(0.25, 0.8, 0.25, 1); }
.vis-cf-progress-text { font-size: 13px; color: var(--cf-label); font-weight: 500; text-align: right; }

/* Kroki formularza */
.vis-cf-step { display: none; }
.vis-cf-step.vis-step-active { display: block; animation: visStepFadeIn 0.4s ease forwards; }
.vis-step-title { font-size: 20px; color: var(--cf-text); margin-bottom: 25px; margin-top: 0; }

@keyframes visStepFadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* Przyciski Nawigacji */
.vis-cf-footer.has-steps { display: flex; justify-content: space-between; align-items: center; gap: 15px; margin-top: 35px; }
.vis-cf-btn { 
    position: relative; display: inline-flex; align-items: center; justify-content: center;
    padding: 16px 36px; border-radius: var(--cf-radius); cursor: pointer; transition: all 0.3s ease; font-weight: 600; font-size: 16px;
}
.vis-cf-btn-primary { background-color: var(--cf-brand); color: #fff; border: none; }
.vis-cf-btn-primary:hover { filter: brightness(1.1); transform: translateY(-2px); box-shadow: 0 4px 12px rgba(193,31,42,0.3); }
.vis-cf-btn-secondary { background-color: transparent; color: var(--cf-text); border: 2px solid var(--cf-border); }
.vis-cf-btn-secondary:hover { border-color: var(--cf-brand); color: var(--cf-brand); background-color: #fff; }

.vis-cf-submit { margin-left: auto; } /* Wyrównanie do prawej na ostatnim kroku */

/* --- LOGIKA WARUNKOWA --- */
.vis-hidden-by-cond { display: none; }


/* =========================================
   TRYB EDYCJI W ELEMENTORZE (WIDOK WSZYSTKICH PÓL)
   ========================================= */
body.elementor-editor-active .vis-cf-step {
    display: block !important;
    opacity: 1 !important;
    margin-bottom: 30px;
    padding: 25px 20px 10px;
    border: 2px dashed var(--cf-border);
    border-radius: var(--cf-radius);
    position: relative;
}

/* Etykietka z numerem kroku w edytorze */
body.elementor-editor-active .vis-cf-step::before {
    content: "WIDOK EDYTOR: KROK " attr(data-step);
    position: absolute;
    top: -12px;
    left: 20px;
    background: #fff;
    color: var(--cf-brand);
    border: 2px solid var(--cf-brand);
    padding: 4px 12px;
    font-size: 11px;
    font-weight: bold;
    border-radius: 4px;
    z-index: 10;
    letter-spacing: 1px;
}

/* Pokaż pola ukryte warunkowo w edytorze (lekko przezroczyste) */
body.elementor-editor-active .vis-hidden-by-cond {
    display: flex !important;
    opacity: 0.5;
    outline: 1px dashed orange;
    outline-offset: 4px;
}

/* Ukryj pasek postępu w trybie edycji, by nie mylił */
body.elementor-editor-active .vis-cf-progress {
    display: none !important;
}

/* Pokaż wszystkie przyciski na raz, by dało się edytować ich styl */
body.elementor-editor-active .vis-btn-prev,
body.elementor-editor-active .vis-btn-next,
body.elementor-editor-active .vis-cf-submit {
    display: inline-flex !important;
}

/* --- DUŻY KOMUNIKAT SUKCESU --- */
.vis-cf-big-success-msg {
    text-align: center;
    padding: 40px 20px;
    background: var(--cf-bg);
    border: 2px dashed var(--cf-brand);
    border-radius: var(--cf-radius);
    animation: visFadeInUp 0.6s ease forwards;
}
.vis-cf-big-success-msg h2 {
    color: var(--cf-brand);
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 28px;
}
.vis-cf-big-success-msg p {
    color: var(--cf-text);
    font-size: 16px;
    line-height: 1.6;
}

/* =========================================
   MIKROANIMACJE I EFEKTY UX (v1.8.0)
   ========================================= */

/* 1. Płynne pola tekstowe (Focus Ring & Lift) */
.vis-input, .vis-select {
    transition: border-color 0.3s ease, box-shadow 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), transform 0.3s ease;
}
.vis-input:focus, .vis-select:focus {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
}

/* 2. Unoszenie kafelków wyboru i załączników */
.vis-card-label, .vis-file-label {
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
}
.vis-card-label:hover, .vis-file-label:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.08);
    border-color: var(--cf-brand);
}

/* 3. Efekt "Pop" przy zaznaczaniu Checkboxa/Radio */
.vis-custom-box {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.2s ease, border-color 0.2s ease;
}
.vis-hidden-input:checked + .vis-card-label .vis-custom-box,
.vis-hidden-input:checked + .vis-consent-label .vis-custom-box {
    animation: visCheckPop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes visCheckPop {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

/* =========================================
   ANIMACJE PRZEJŚCIA KROKÓW (FADE / ZOOM / SLIDE)
   ========================================= */
.vis-cf-steps-container {
    overflow: hidden; 
    position: relative;
    width: auto;
    padding: 10px 5px 20px;
    margin-top: -10px; 
}

.vis-cf-step {
    width: 100%;
}

.vis-cf-form .vis-cf-step.vis-step-active {
    display: block !important;
    opacity: 1;
    transform: none;
    animation: none;
}

/* FADE */
.vis-anim-fade-in { animation: visFadeIn 0.4s ease forwards !important; }
.vis-anim-fade-out { position: absolute; top: 10px; left: 5px; right: 5px; animation: visFadeOut 0.4s ease forwards !important; }

/* ZOOM */
.vis-anim-zoom-in { animation: visZoomIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards !important; }
.vis-anim-zoom-out { position: absolute; top: 10px; left: 5px; right: 5px; animation: visZoomOut 0.4s ease forwards !important; }

/* SLIDE */
.vis-anim-slide-in { animation: visSlideIn 0.4s cubic-bezier(0.23, 1, 0.32, 1) forwards !important; }
.vis-anim-slide-out { position: absolute; top: 10px; left: 5px; right: 5px; animation: visSlideOut 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards !important; }

@keyframes visFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes visFadeOut { from { opacity: 1; } to { opacity: 0; } }

@keyframes visZoomIn { from { opacity: 0; transform: scale(0.9); } to { opacity: 1; transform: scale(1); } }
@keyframes visZoomOut { from { opacity: 1; transform: scale(1); } to { opacity: 0; transform: scale(1.1); } }

@keyframes visSlideIn { from { opacity: 0; transform: scale(0.95) translateX(30px); } to { opacity: 1; transform: scale(1) translateX(0); } }
@keyframes visSlideOut { from { opacity: 1; transform: scale(1) translateX(0); } to { opacity: 0; transform: scale(1.05) translateX(-30px); } }

/* --- POMOCNICZY TEKST DLA PLIKÓW --- */
.vis-file-help {
    display: block;
    margin-top: 8px;
    font-size: 12px;
    color: var(--cf-label);
    opacity: 0.8;
}
.vis-file-help strong {
    font-weight: 600;
}

/* =========================================
   ZAAWANSOWANA SIATKA FORMULARZA (CSS Grid)
   ========================================= */
.vis-cf-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    align-items: start; /* Pozwala krótszym polom zachować swoją wysokość */
}

/* Wymuszamy układ flex wewnątrz pojedynczego pola, aby textarea mogło rosnąć */
.vis-input-group {
    display: flex;
    flex-direction: column;
    width: 100% !important; /* Nadpisuje stare Float/Flex */
    height: 100%; /* Przygotowanie pod rozciąganie */
}

/* Szerokości kolumn */
.vis-col-100 { grid-column: span 2; }
.vis-col-50  { grid-column: span 1; }

/* Ukrywanie warunkowe w Gridzie */
.vis-input-group.vis-hidden-by-cond {
    display: none !important;
}

/* Magia rozciągania obszaru roboczego Textarea */
.vis-input-group[style*="grid-row: span"] textarea {
    flex-grow: 1; /* Wypełnia całą dostępną, "zassaną" przestrzeń w pionie */
    min-height: 120px;
    resize: none; /* Blokujemy ręczne skalowanie, żeby nie popsuć siatki */
}

/* --- RWD: Ekran telefonu --- */
@media (max-width: 767px) {
    .vis-cf-grid {
        grid-template-columns: 1fr; /* Jedna kolumna na komórce */
    }
    .vis-col-50, .vis-col-100 { 
        grid-column: span 1 !important; 
    }
    .vis-input-group { 
        grid-row: span 1 !important; /* Wyłączamy rozciąganie na telefony (wszystko leci jedno pod drugim) */
    }
}

/* --- FIX DLA NATYWNYCH PÓL DATY (Etykiety) --- */
/* Kalendarze zawsze pokazują format DD.MM.RRRR, więc etykieta nie może opadać, by nie nachodzić na tekst */
.vis-input[type="date"]~.vis-cf-label,
.vis-input[type="datetime-local"]~.vis-cf-label,
.vis-input[type="time"]~.vis-cf-label {
    transform: translateY(-24px) scale(0.85) !important;
    background-color: #fff !important;
    padding: 0 4px !important;
    left: 12px !important;
    top: 14px !important;
    color: var(--cf-brand) !important;
    border-radius: var(--cf-label-radius) !important;
}

/* Wymuszenie kursora tekstowego, by łatwiej się klikało w kalendarz na desktopie */
.vis-input[type="date"],
.vis-input[type="datetime-local"] {
    cursor: text;
}

/* --- BLOK INFORMACYJNY (HTML) --- */
.vis-html-block {
    font-size: 15px;
    line-height: 1.6;
    color: var(--cf-text);
    padding: 8px 0;
}

.vis-html-block p:first-child {
    margin-top: 0;
}

.vis-html-block p:last-child {
    margin-bottom: 0;
}

.vis-html-block a {
    color: var(--cf-brand);
    text-decoration: underline;
}

/* =========================================================
   ZAAWANSOWANE ZAŁĄCZNIKI (KUMULACYJNE "PIGUŁKI")
   ========================================================= */
.vis-file-pills-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
    position: relative;
    z-index: 5;
}

.vis-file-pill {
    display: inline-flex;
    align-items: center;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 13px;
    font-weight: 500;
    color: #334155;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    transition: all 0.2s ease;
}

.vis-file-pill:hover {
    background: #e2e8f0;
    border-color: #94a3b8;
}

.vis-file-pill-name {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vis-file-pill-remove {
    background: none;
    border: none;
    color: #ef4444;
    font-size: 18px;
    line-height: 1;
    margin-left: 8px;
    cursor: pointer;
    padding: 0 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: color 0.2s, transform 0.2s;
}

.vis-file-pill-remove:hover {
    color: #b91c1c;
    transform: scale(1.1);
}

/* =========================================================
   POPRAWKI: MINIMALISTYCZNY DRAG & DROP + PODSUMOWANIE
   ========================================================= */

/* Subtelne podświetlenie starego kafelka przy przeciąganiu pliku */
.vis-file-wrapper.is-dragover .vis-file-label {
    border-color: var(--cf-brand);
    color: var(--cf-brand);
    background-color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

/* Wygląd podsumowania na dole (Ilość plików i Waga) */
.vis-file-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: var(--cf-label);
    margin-top: 10px;
    padding: 0 6px;
    animation: visFadeInUp 0.3s ease forwards;
}

.vis-file-summary strong {
    color: var(--cf-text);
    font-weight: 600;
}

/* =========================================================
   CUSTOM DROPDOWN (Kierunkowe Telefonów i Flagi)
   ========================================================= */
.vis-tel-wrapper {
    position: relative;
    width: 100%;
}

.vis-input-tel {
    padding-left: 105px !important;
}

.vis-input-tel ~ .vis-cf-label {
    left: 105px;
}
.vis-input-tel:focus ~ .vis-cf-label,
.vis-input-tel:not(:placeholder-shown) ~ .vis-cf-label,
.vis-input-tel:-webkit-autofill ~ .vis-cf-label {
    left: 12px !important;
}

/* Pojemnik */
.vis-custom-select-wrapper {
    position: absolute;
    top: 1px;
    left: 1px;
    width: 95px;
    height: 52px; /* Wysokość inputa */
    z-index: 10;
}

/* Przycisk aktywujący */
.vis-custom-select-trigger {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    border-right: 1px solid var(--cf-border);
    border-radius: var(--cf-radius) 0 0 var(--cf-radius);
    background-color: transparent;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.3s ease;
    font-size: 14px;
    color: var(--cf-text);
}

.vis-custom-select-trigger:hover {
    background-color: rgba(0,0,0,0.02);
}

.vis-input-tel:focus ~ .vis-custom-select-wrapper .vis-custom-select-trigger,
.vis-custom-select-wrapper.is-open .vis-custom-select-trigger {
    border-right-color: var(--cf-brand);
}

/* Obrazki Flag (SVG) */
.vis-custom-select-wrapper img {
    width: 24px;
    height: 18px;
    object-fit: cover;
    border-radius: 2px;
    margin-right: 6px;
    box-shadow: 0 0 2px rgba(0,0,0,0.2);
}

/* Dyskretna strzałka w dół */
.vis-custom-select-trigger::after {
    content: "";
    display: block;
    width: 10px;
    height: 10px;
    margin-left: 4px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    transition: transform 0.2s ease;
}

.vis-custom-select-wrapper.is-open .vis-custom-select-trigger::after {
    transform: rotate(180deg);
}

/* Lista rozwijana */
.vis-custom-select-options {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    width: 280px;
    background: #fff;
    border: 1px solid var(--cf-border);
    border-radius: var(--cf-radius);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
    pointer-events: none;
    display: flex;
    flex-direction: column;
}

.vis-custom-select-wrapper.is-open .vis-custom-select-options {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

/* Wyszukiwarka wewnątrz listy */
.vis-custom-select-search {
    padding: 10px;
    border-bottom: 1px solid var(--cf-border);
    background: #f8fafc;
    border-radius: var(--cf-radius) var(--cf-radius) 0 0;
}

.vis-country-search {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--cf-border);
    border-radius: 4px;
    font-size: 13px;
    outline: none;
}

.vis-country-search:focus {
    border-color: var(--cf-brand);
}

/* Opcje państw (Scrollowana lista) */
.vis-options-list {
    max-height: 220px;
    overflow-y: auto;
}

.vis-custom-select-option {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    cursor: pointer;
    transition: background-color 0.2s;
    font-size: 14px;
    color: var(--cf-text);
}

.vis-custom-select-option:hover {
    background-color: #f1f5f9;
}

.vis-country-name {
    flex-grow: 1;
}

.vis-country-dial {
    color: var(--cf-label);
    font-weight: 600;
    font-size: 13px;
}

/* =========================================================
   E-PODPIS (Signature Canvas)
   ========================================================= */
.vis-signature-wrapper {
    position: relative;
    background: #f8fafc; /* Lekko szarawe tło sugerujące "obszar do pisania" */
    border: 2px dashed #cbd5e1; /* Przerywana ramka */
    border-radius: var(--cf-radius);
    overflow: hidden;
    transition: border-color 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
}

/* Stan, gdy użytkownik rysuje (Focus) */
.vis-signature-wrapper.is-drawing {
    background: #fff;
    border-color: var(--cf-brand);
    border-style: solid;
    box-shadow: inset 0 2px 8px rgba(0,0,0,0.05);
}

/* Reakcja na błąd (np. brak podpisu, gdy jest wymagany) */
.vis-input-group.has-error .vis-signature-wrapper {
    border-color: var(--cf-error);
    background-color: #fffafa;
}

.vis-signature-canvas {
    display: block;
    width: 100%;
    height: 160px; /* Nieco wyższe, by wygodnie podpisać się na komórce */
    cursor: crosshair;
    touch-action: none; /* KLUCZOWE: Blokuje przewijanie strony palcem podczas rysowania! */
}

/* Nowoczesny przycisk "Wyczyść" */
.vis-signature-clear {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Ikonka krzyżyka w przycisku */
.vis-signature-clear::before {
    content: "×";
    font-size: 16px;
    line-height: 1;
    font-weight: 400;
}

.vis-signature-clear:hover {
    background: #fee2e2;
    border-color: #fca5a5;
    color: var(--cf-error);
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.08);
}

/* =========================================
   ZAAWANSOWANE PODSUMOWANIE KALKULATORA
   ========================================= */
.vis-calc-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    margin-top: 30px;
    margin-bottom: 20px;
    background-color: var(--cf-bg);
    border: 2px dashed var(--cf-border);
    border-radius: var(--cf-radius);
    transition: all 0.3s ease;
}

.vis-calc-wrapper:hover {
    border-color: var(--cf-brand);
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.vis-calc-label {
    font-size: 16px;
    font-weight: 600;
    color: var(--cf-text);
}

.vis-calc-total {
    font-size: 24px;
    font-weight: 800;
    color: var(--cf-brand);
}

/* =========================================
   NOWE ANIMACJE (SLIDE & LIFT)
   ========================================= */
.vis-cf-steps-container {
    overflow: hidden; 
    position: relative;
    padding: 10px 5px 20px;
}

/* Wyłączamy elementorową animację */
.vis-cf-form .vis-cf-step.vis-step-active {
    display: block !important;
    opacity: 1;
    transform: none;
    animation: none;
}

/* --- ANIMACJE WEJŚCIA (Incoming) --- */
.vis-cf-form .vis-cf-step.vis-step-slide-next {
    animation: visStepPopNextIn 0.45s cubic-bezier(0.23, 1, 0.32, 1) forwards !important;
}
.vis-cf-form .vis-cf-step.vis-step-slide-prev {
    animation: visStepPopPrevIn 0.45s cubic-bezier(0.23, 1, 0.32, 1) forwards !important;
}

@keyframes visStepPopNextIn {
    0% { opacity: 0; transform: scale(0.95) translateX(30px); }
    100% { opacity: 1; transform: scale(1) translateX(0); }
}
@keyframes visStepPopPrevIn {
    0% { opacity: 0; transform: scale(0.95) translateX(-30px); }
    100% { opacity: 1; transform: scale(1) translateX(0); }
}

/* --- ANIMACJE WYJŚCIA (Outgoing) --- */
.vis-cf-form .vis-cf-step.vis-step-slide-next-out {
    position: absolute; top: 10px; left: 5px; right: 5px; /* trzyma stary element w miejscu podczas zanikania */
    animation: visStepSlideNextOut 0.35s cubic-bezier(0.4, 0, 0.2, 1) forwards !important;
}
.vis-cf-form .vis-cf-step.vis-step-slide-prev-out {
    position: absolute; top: 10px; left: 5px; right: 5px;
    animation: visStepSlidePrevOut 0.35s cubic-bezier(0.4, 0, 0.2, 1) forwards !important;
}

@keyframes visStepSlideNextOut {
    0% { opacity: 1; transform: scale(1) translateX(0); }
    100% { opacity: 0; transform: scale(1.05) translateX(-30px); }
}
@keyframes visStepSlidePrevOut {
    0% { opacity: 1; transform: scale(1) translateX(0); }
    100% { opacity: 0; transform: scale(1.05) translateX(30px); }
}

/* --- STYLIZACJA TREŚCI W KAFELKACH --- */
.vis-cards-grid .vis-card-label {
    flex-direction: column; /* Układamy nazwę i cenę pionowo */
    padding: 20px 15px;
    min-height: 90px;
    justify-content: center;
    gap: 6px;
}

/* Nazwa usługi */
.vis-option-name {
    display: block;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
}

/* Cena pod nazwą */
.vis-option-price {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--cf-brand); /* Używamy koloru akcentu */
    opacity: 0.9;
}

/* Zmiana koloru ceny na biały, gdy kafelek jest zaznaczony */
.vis-hidden-input:checked + .vis-card-label .vis-option-price {
    color: #fff;
    opacity: 1;
}

/* Poprawka dla standardowych list (nie kafelków) */
.vis-standard-list .vis-option-name {
    font-weight: 500;
}

/* =========================================
   KUPONY RABATOWE
   ========================================= */
.vis-coupon-wrapper {
    display: flex;
    gap: 12px;
    align-items: stretch;
}
.vis-coupon-input {
    flex-grow: 1;
}
.vis-coupon-btn {
    padding: 0 24px;
    white-space: nowrap;
    height: auto; /* Zrówna się do wysokości inputa */
}
.vis-coupon-btn.is-active {
    background-color: var(--cf-text); /* Ciemny kolor sugerujący usunięcie aktywnego kodu */
    border-color: var(--cf-text);
}
.vis-coupon-btn.is-active:hover {
    background-color: var(--cf-error);
    border-color: var(--cf-error);
}
.vis-coupon-msg {
    font-size: 13px;
    font-weight: 600;
    margin-top: 8px;
    display: none;
}
.vis-coupon-msg.is-success {
    color: var(--cf-success);
}
.vis-coupon-msg.is-error {
    color: var(--cf-error);
}