/* Reset i czcionka */
.kw-search-wrapper {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #333;
    line-height: 1.6;
}


/* --- NAPRAWA IKONEK (DASHICONS) W KARTACH --- */

/* 1. Wymuszenie czcionki i rozmiaru dla wszystkich ikon w karcie */
.kw-card .dashicons {
    font-family: "dashicons", sans-serif !important;
    /* !important dla pewności */
    display: inline-block;
    width: 18px;
    height: 18px;
    font-size: 18px;
    line-height: 1;
    text-decoration: none;
    vertical-align: middle;
    margin-right: 2px;
    position: relative;
    top: -1px;
    /* Mikro-korekta w pionie, żeby były równo z tekstem */
}

/* 2. Ikona lokalizacji (Pinezka) */
.kw-card-location .dashicons {
    color: #9ca3af;
    /* Szary kolor pinezki */
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* 3. Ikona zweryfikowany (Tarcza) */
.kw-verified-badge .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
    color: #fff;
}

/* 4. Ikony na przyciskach (Telefon/Email) */
.kw-card-btn .dashicons {
    color: inherit;
    /* Dziedziczy kolor tekstu (biały na zielonym, szary na jasnym) */
}

/* --- FORMULARZ WYSZUKIWANIA --- */

/* Główny kontener formularza */
.kw-search-wrapper {
    max-width: 1200px;
    margin: 40px auto;
    padding: 30px;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    text-align: center;
}

/* Nagłówek formularza (opcjonalnie, jeśli jest używany) */
.kw-search-form h3 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 25px;
    color: #111;
}

/* Grupa pól input + button */
.kw-input-group {
    display: flex;
    gap: 15px;
    background: #f9fafb; /* Lekkie tło dla całej grupy */
    padding: 8px;
    border-radius: 50px; /* Makes the whole bar rounded */
    border: 1px solid #e5e7eb;
}

/* --- Nowe style dla Selecta (Wybór promienia) --- */

.kw-input-group select {
    appearance: none; /* Ukrywa systemową strzałkę */
    -webkit-appearance: none;
    -moz-appearance: none;
    
    border: none;
    background-color: transparent;
    font-family: inherit;
    font-size: 15px;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    outline: none;
    padding: 16px 35px 16px 20px; /* Prawy padding większy na strzałkę */
    border-radius: 50px;
    transition: background-color 0.2s, color 0.2s;
    
    /* Własna strzałka SVG (ciemnoszara) zakodowana w base64 */
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%236b7280%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 15px top 50%;
    background-size: 10px auto;
    
    /* Separator pionowy po lewej stronie dla estetyki */
    border-left: 1px solid #e5e7eb; 
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

/* Efekt najechania myszką */
.kw-input-group select:hover {
    background-color: #e5e7eb; /* Lekkie przyciemnienie tła */
    color: #111;
}

/* Focus (klawiatura) */
.kw-input-group select:focus {
    background-color: #fff;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2); /* Zielona poświata */
}

/* Pole tekstowe (input) */
.kw-input-group input[type=text] {
    flex: 1;
    padding: 16px 24px;
    border: none;
    background: transparent;
    font-size: 16px;
    color: #374151;
    outline: none; /* Usuwa domyślny obrys przy kliknięciu */
}

.kw-input-group input::placeholder {
    color: #9ca3af;
}

/* Przycisk "Szukaj" */
.kw-btn-search {
    padding: 16px 32px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%); /* Zielony gradient */
    color: white;
    border: none;
    border-radius: 50px; /* W pełni zaokrąglone rogi */
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3); /* Delikatny cień pod przyciskiem */
    white-space: nowrap; /* Zapobiega łamaniu tekstu */
    width: 100% !important;
    margin-top:30px;
}

.kw-btn-search:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%); /* Ciemniejszy gradient po najechaniu */
    transform: translateY(-2px); /* Lekkie uniesienie */
    box-shadow: 0 6px 15px rgba(16, 185, 129, 0.4);
}

/* Responsywność - na małych ekranach jedno pod drugim */
@media (max-width: 600px) {
    .kw-search-wrapper {
        padding: 20px;
        margin: 20px;
    }

    .kw-input-group {
        flex-direction: column;
        background: transparent;
        border: none;
        padding: 0;
        gap: 15px;
    }

    .kw-input-group input {
        background: #f9fafb;
        border: 1px solid #e5e7eb;
        border-radius: 50px;
        width: 100%;
        box-sizing: border-box; /* Ważne dla paddingu */
    }

    .kw-input-group select {
        width: 100%;
        max-width: 100% !important; /* Nadpisuje inline style z PHP */
        background-color: #f9fafb; /* Szare tło jak input */
        border: 1px solid #e5e7eb;
        border-radius: 50px; /* Pełne zaokrąglenie */
        padding: 16px 24px;
        background-position: right 20px top 50%; /* Strzałka */
        margin-bottom: 0;
    }

    .kw-input-group button {
        width: 100%;
        padding: 18px;
    }
}


/* --- ALERTY I WYNIKI (Pozostawione bez większych zmian, aby pasowały do reszty) --- */

/* Alerty */
.kw-alert {
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 25px;
    font-weight: 500;
    text-align: left;
}
.kw-error { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.kw-info { background: #f0f9ff; color: #0369a1; border: 1px solid #bae6fd; }

/* Lista wyników */
.kw-results-list {
    text-align: left;
    margin-top: 30px;
}

.kw-results-list h4 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
}

.kw-results-list ul {
    list-style: none;
    padding: 0;
    margin: 0;
}



.kw-item-title {
    font-size: 18px;
    font-weight: 700;
    text-decoration: none;
    color: #111;
    transition: color 0.2s;
}
.kw-item-title:hover {
    color: #059669; /* Kolor przycisku po najechaniu */
}

.kw-item-meta {
    font-size: 14px;
    color: #6b7280;
    margin-top: 6px;
}

.kw-item-distance {
    background: #ecfdf5;
    color: #047857;
    padding: 8px 12px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
}





/* --- FORMULARZ DODAWANIA (REJESTRACJA) --- */
/* --- FORMULARZ DODAWANIA (REJESTRACJA) --- */
/* --- FORMULARZ DODAWANIA (REJESTRACJA) --- */

.kw-form-wrapper {
    max-width: 600px;
    margin: 40px auto;
    background: #fff;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    border: 1px solid #f3f4f6;
}

.kw-add-form h3 {
    margin-top: 30px;
    margin-bottom: 15px;
    font-size: 18px;
    color: #111;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.kw-form-group {
    margin-bottom: 20px;
    text-align: left;
}

.kw-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 14px;
    color: #374151;
}

.kw-form-group input[type="text"],
.kw-form-group input[type="email"], /* <-- Dodane */
.kw-form-group input[type="tel"],   /* <-- Dodane dla pewności */
.kw-form-group input[type="url"],
.kw-form-group input[type="password"],
.kw-form-group textarea,
.kw-review-form-box textarea,
.kw-review-form-box input[type="text"],
.kw-review-form-box input[type="email"]
 {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 15px;
    color: #1f2937;
    background: #f9fafb;
    transition: border-color 0.2s, background 0.2s;
    box-sizing: border-box; /* Kluczowe, żeby padding nie rozpychał inputa */
}

.kw-form-group input:focus,
.kw-form-group textarea:focus {
    border-color: #10b981;
    background: #fff;
    outline: none;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

/* Układ dwukolumnowy dla adresu */
.kw-form-row {
    display: flex;
    gap: 20px;
}
.kw-form-group.half {
    flex: 1;
}

/* Przycisk */
.kw-btn-primary {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    margin-top: 10px;
}

.kw-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

/* Wiadomość sukcesu */
.kw-success { 
    background: #ecfdf5; 
    color: #065f46; 
    border: 1px solid #a7f3d0; 
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    font-weight: 600;
}



/* --- BUTTONY KONTAKTOWE (Wizytówka) --- */
/* --- BUTTONY KONTAKTOWE (Wizytówka) --- */
/* --- BUTTONY KONTAKTOWE (Wizytówka) --- */

.kw-reveal-btn {
    padding: 12px 24px;
    border: 2px solid #10b981; /* Zielona ramka */
    background: white;
    color: #10b981;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.kw-reveal-btn:hover {
    background: #ecfdf5;
}

/* Stan po kliknięciu (Odkryty) */
.kw-reveal-btn.revealed {
    background: #10b981;
    color: white;
    border-color: #10b981;
    cursor: default; /* Lub pointer jeśli zamieniamy w link */
}

/* Ikony dashicons (jeśli motyw ich nie ładuje, można usunąć spany w PHP) */
.kw-reveal-btn .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

/* Dodatek do inputów checkbox w formularzach */
.kw-form-row input[type="checkbox"] {
    accent-color: #10b981; /* Zielony kolor zaznaczenia (dla nowoczesnych przeglądarek) */
    width: 16px;
    height: 16px;
    margin: 0;
}


/* --- DYNAMICZNE MENU --- */

/* Wspólne style dla obu stanów */
li.kw-menu-guest a,
li.kw-menu-logged-in a {
    border-radius: 50px;
    padding: 10px 20px !important; /* !important nadpisuje style motywu */
    font-weight: 600 !important;
    transition: all 0.3s ease;
    margin-left: 10px; /* Odstęp od reszty menu */
}

/* Stan: Niezalogowany (Przycisk Zielony) */
li.kw-menu-guest a {
    background: #10b981;
    color: white !important;
    border: 1px solid #10b981;
}

li.kw-menu-guest a:hover {
    background: #059669;
    color: white !important;
}

/* Stan: Zalogowany (Przycisk Biały z ramką) */
li.kw-menu-logged-in a {
    background: transparent;
    border: 2px solid #10b981;
    color: #10b981 !important;
}

li.kw-menu-logged-in a:hover {
    background: #10b981;
    color: white !important;
}

/* Responsywność - jeśli menu na telefonie jest rozwijane */
@media (max-width: 900px) {
    li.kw-menu-guest a,
    li.kw-menu-logged-in a {
        display: inline-block;
        margin-top: 10px;
        margin-left: 0;
    }
}

/* --- OSTATNIO DODANE (SHORTCODE) --- */

.kw-latest-wrapper {
    margin: 40px 0;
}

.kw-section-title {
    text-align: center;
    font-size: 28px;
    margin-bottom: 30px;
    font-weight: 700;
    color: #111;
}

/* Grid Layout */
.kw-latest-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); /* Responsywny grid */
    gap: 20px;
}

/* Karta */


/* Treść karty */
.kw-card-content {
    flex: 1;
}

.kw-new-badge {
    background: #d1fae5;
    color: #065f46;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 4px;
    display: inline-block;
    margin-bottom: 8px;
}

.kw-card-heading {
    margin: 0 0 8px 0;
    font-size: 18px;
    color: #1f2937;
    font-weight: 600;
}


/* Metadane (Miasto, Data) */
.kw-card-meta {
    display: flex;
    gap: 15px;
    font-size: 13px;
    color: #6b7280;
    align-items: center;
}

.kw-meta-city .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
    vertical-align: middle;
}

/* Strzałka po prawej */
.kw-card-arrow {
    font-size: 20px;
    color: #d1d5db;
    font-weight: 300;
    margin-left: 15px;
    transition: transform 0.3s, color 0.3s;
}





/* --- WYBÓR SPECJALIZACJI (BUTTONY) --- */
.kw-specs-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

/* Ukrywamy domyślny checkbox */
.kw-spec-btn input[type="checkbox"] {
    display: none;
}

/* Stylizacja etykiety jako przycisku */
.kw-spec-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: #fff;
    border: 1px solid #d1d5db; /* Szara ramka */
    border-radius: 50px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    transition: all 0.2s ease;
    user-select: none;
}

.kw-spec-label:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}

/* Stan ZAZNACZONY */
.kw-spec-btn input[type="checkbox"]:checked + .kw-spec-label {
    background: #ecfdf5;       /* Jasnozielone tło */
    border-color: #10b981;     /* Zielona ramka */
    color: #065f46;            /* Ciemnozielony tekst */
    font-weight: 700;
}

/* Ikonka ptaszka (pojawia się tylko po zaznaczeniu) */
.kw-spec-check {
    width: 16px;
    height: 16px;
    display: none; /* Domyślnie ukryta */
    fill: currentColor;
}

.kw-spec-btn input[type="checkbox"]:checked + .kw-spec-label .kw-spec-check {
    display: block; /* Pokaż po zaznaczeniu */
}

/* --- FILE UPLOAD --- */
.kw-file-upload-wrapper {
    margin-bottom: 20px;
}
.kw-file-input {
    display: block;
    width: 100%;
    padding: 10px;
    background: #f9fafb;
    border: 1px dashed #d1d5db;
    border-radius: 8px;
    cursor: pointer;
}



/* --- SYSTEM OPINII --- */

.kw-reviews-section {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

/* Lista opinii */
.kw-review-item {
    background: #f9fafb;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    border: 1px solid #e5e7eb;
}

.kw-review-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.kw-stars-display {
    color: #f59e0b; /* Żółty/Złoty */
    letter-spacing: 2px;
}

/* Formularz dodawania */
.kw-review-form-box {
    background: #fff;
    border: 1px solid #e5e7eb;
    padding: 25px;
    border-radius: 12px;
    margin-top: 30px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.03);
}

/* GWIAZDKI DO GŁOSOWANIA (CSS Magic) */
.kw-rating-input {
    margin-bottom: 15px;
}

.kw-stars-input {
    display: inline-flex;
    flex-direction: row-reverse; /* Odwracamy kolejność, żeby hover działał w lewo */
    gap: 5px;
}

.kw-stars-input input {
    display: none; /* Ukrywamy radio buttony */
}

.kw-stars-input label {
    font-size: 30px;
    color: #d1d5db; /* Szary domyślnie */
    cursor: pointer;
    transition: color 0.2s;
    line-height: 1;
}

/* Hover i Checked */
.kw-stars-input label:hover,
.kw-stars-input label:hover ~ label,
.kw-stars-input input:checked ~ label {
    color: #f59e0b; /* Złoty po zaznaczeniu/najechaniu */
}

.kw-header-rating {
    margin-bottom: 15px;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 5px;
}






/* --- NOWY WYGLĄD KARTY WYKONAWCY (GRID) --- */

/* Kontener Grida (wspólny dla wszystkich sekcji) */
.kw-grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

/* Pojedyncza Karta */
.kw-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.kw-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
    border-color: #10b981;
}

/* Sekcja Zdjęcia */
.kw-card-image {
    position: relative;
    height: 200px;
    background: #f3f4f6;
    overflow: hidden;
}

.kw-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Odznaka "Zweryfikowany" */
.kw-verified-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #10b981;
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
}

.kw-verified-badge .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
}

/* Treść Karty */
.kw-card-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.kw-card-title {
    font-size: 18px;
    font-weight: 700;
    color: #111;
    margin: 0 0 10px 0;
    text-decoration: none;
}

.kw-card-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 15px;
}

.kw-card-location {
    display: flex;
    align-items: center;
    gap: 5px;
}

.kw-card-rating {
    display: flex;
    align-items: center;
    gap: 5px;
}
.kw-rating-star { color: #f59e0b; }
.kw-rating-score { font-weight: 600; color: #111; }

/* Specjalizacje */
.kw-card-specs {
    margin-bottom: 20px;
}
.kw-specs-title {
    font-size: 13px;
    color: #9ca3af;
    margin-bottom: 8px;
    display: block;
}
.kw-specs-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.kw-spec-tag {
    background: #f3f4f6;
    color: #374151;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
}

/* Przyciski na dole */
.kw-card-actions {
    display: flex;
    gap: 10px;
    margin-top: auto; /* Dopycha do dołu */
}

.kw-card-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    border: none;
}

.kw-btn-call {
    background: #10b981;
    color: white;
}
.kw-btn-call:hover { background: #059669; }

.kw-btn-email {
    background: #f3f4f6;
    color: #374151;
}
.kw-btn-email:hover { background: #e5e7eb; }

/* Responsywność */
@media (max-width: 600px) {
    .kw-grid-container {
        grid-template-columns: 1fr;
    }
    .kw-card-actions {
        flex-direction: column;
    }
    .kw-card-btn {
        width: 100%;
    }
}


/* Styl dla dystansu na karcie */
.kw-card-distance {
    color: #10b981;
    /* Zielony kolor wyróżniający */
    font-size: 13px;
    white-space: nowrap;
}

/* Upewniamy się, że obrazek w linku wypełnia kontener */
.kw-card-image a {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
}

/* Styl dla braku ocen w gridzie */
.kw-no-rating {
    color: #9ca3af;
    /* Jasnoszary */
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Opcjonalnie: szara gwiazdka przy braku ocen */
.kw-no-rating::before {
    content: '★';
    color: #e5e7eb;
    /* Bardzo jasna szarość */
    font-size: 14px;
}