/* Frontend Styles - PapaLima Portal */

/* Layout improvements */
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
    background-color: #f8f9fa;
}

main {
    flex: 1;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

/* Container adjustments for full-width */
.container-fluid {
    padding-left: 15px;
    padding-right: 15px;
}

@media (min-width: 1200px) {
    .container-fluid {
        padding-left: 30px;
        padding-right: 30px;
    }
}

/* Legacy styles kept for compatibility */
.jumbotron {
    background-color: #f8f9fa;
    padding: 2rem;
    border-radius: 0.3rem;
    margin-bottom: 2rem;
}

.card {
    border-radius: 0.3rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    margin-bottom: 1.5rem;
}

.card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

.card-header:first-child {
    border-top-left-radius: 8px !important;
    border-top-right-radius: 8px !important;
}

/* Form Elements */
.form-control {
    border-radius: 0.3rem;
    border: 1px solid #ced4da;
}

.form-control:focus {
    border-color: #80bdff;
}

.btn {
    border-radius: 0.3rem;
}

/* Navigation */
.navbar-brand {
    font-weight: bold;
}

/* Footer */
footer {
    margin-top: auto;
}

/* Navbar improvements */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1030;
    width: 100%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border-bottom: 1px solid #d5d5d5;
    background-color: #f8f9fa;
    background-image: url('/public/assets/images/nav_background.png');
    /*background-size: cover;*/
    background-position: center;
    background-repeat: no-repeat;
    /*background-attachment: fixed;*/
}

.navbar-brand {
    font-size: 1.5rem;
    color: #333 !important;
}

.navbar .btn {
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 0.9rem;
    white-space: nowrap;
}

.navbar .btn-warning {
    background-color: #ffc107;
    border-color: #ffc107;
    color: #000;
}

.navbar .btn-warning:hover {
    background-color: #e0a800;
    border-color: #d39e00;
}

.navbar .btn-outline-primary {
    border-radius: 20px;
}

/* Search Section */
.search-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.search-form-container {
    background: rgba(255, 255, 255, 0.95);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.search-form-container .form-label {
    color: #495057;
    font-weight: 500;
}


/* Navbar Logo (marker + słowne logo w jednym linku) + przycisk mapa */
.navbar-brand-group {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    flex: 0 1 auto;
    width: auto;
    max-width: calc(100% - 3.5rem);
    min-width: 0;
    gap: 0.5rem;
    margin-right: auto;
}

.navbar-brand-logo {
    padding-top: 0;
    padding-bottom: 0;
    margin-right: 0;
    flex-shrink: 1;
    min-width: 0;
}

.navbar-logo-composite {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    line-height: 0;
    transition: opacity 0.2s ease;
}

.navbar-brand-logo:hover .navbar-logo-composite {
    opacity: 0.85;
}

.navbar .btn-navbar-map,
.navbar .btn.btn-navbar-map {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #fff !important;
    border: 1px solid #dee2e6 !important;
    color: #6c757d !important;
    border-radius: 8px !important;
    padding: 8px 16px !important;
    font-size: 0.9rem !important;
    font-weight: 500;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
    flex: 0 0 auto;
    width: auto !important;
    max-width: none !important;
    margin: 0 !important;
    position: relative;
    z-index: 1;
    transition: all 0.2s ease;
}

.navbar .btn-navbar-map:hover,
.navbar .btn-navbar-map:focus,
.navbar .btn-navbar-map:active,
.navbar .btn.btn-navbar-map:hover,
.navbar .btn.btn-navbar-map:focus,
.navbar .btn.btn-navbar-map:active {
    background-color: #fff !important;
    border-color: #ced4da !important;
    color: #495057 !important;
    box-shadow: none !important;
}

.navbar-logo-part {
    display: block;
    width: auto;
    object-fit: contain;
    flex-shrink: 0;
}

.navbar-logo-marker {
    height: 52px;
    max-height: 52px;
}

.navbar-logo-word {
    height: 40px;
    max-height: 40px;
    max-width: min(220px, 42vw);
}

@media (max-width: 575.98px) {
    .navbar-logo-marker {
        height: 40px;
        max-height: 40px;
    }

    .navbar-logo-word {
        height: 30px;
        max-height: 30px;
        max-width: 38vw;
    }

    .navbar-logo-composite {
        gap: 0.25rem;
    }
}

/* Navbar Buttons Styling */
.navbar .btn {
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s ease;
    border-width: 1px;
}

/* Login Button - Green theme */
.navbar .btn-outline-primary {
    background-color: #e8f5e8; /* Very light green background */
    border: 1px solid #198754; /* Green border */
    color: #198754; /* Green text and icon */
    border-radius: 8px;
}

.navbar .btn-outline-primary:hover {
    background-color: #d4edda; /* Slightly darker light green on hover */
    border-color: #157347;
    color: #157347;
}

.navbar .btn-outline-primary:focus,
.navbar .btn-outline-primary:active {
    background-color: #d4edda;
    border-color: #157347;
    color: #157347;
    box-shadow: 0 0 0 0.2rem rgba(25, 135, 84, 0.25);
}

/* Register Button - Green theme */
.navbar .btn-primary {
    background-color: #e8f5e8; /* Very light green background */
    border: 1px solid #198754; /* Green border */
    color: #198754; /* Green text and icon */
    border-radius: 8px;
}

.navbar .btn-primary:hover {
    background-color: #d4edda; /* Slightly darker light green on hover */
    border-color: #157347;
    color: #157347;
}

.navbar .btn-primary:focus,
.navbar .btn-primary:active {
    background-color: #d4edda;
    border-color: #157347;
    color: #157347;
    box-shadow: 0 0 0 0.2rem rgba(25, 135, 84, 0.25);
}

/* Add announcement button - Blue theme */
.navbar .btn-warning {
    background-color: #e3f2fd; /* Very light blue background */
    border: 1px solid #1976d2; /* Blue border */
    color: #1976d2; /* Blue text and icon */
    border-radius: 8px;
    font-weight: 500;
}

.navbar .btn-warning:hover {
    background-color: #bbdefb; /* Slightly darker light blue on hover */
    border-color: #1565c0;
    color: #1565c0;
}

.navbar .btn-warning:focus,
.navbar .btn-warning:active {
    background-color: #bbdefb;
    border-color: #1565c0;
    color: #1565c0;
    box-shadow: 0 0 0 0.2rem rgba(25, 118, 210, 0.25);
}

/* Combined Search and Filters Container */
.search-and-filters-container {
    border: 1px solid #d5d5d5;
    border-bottom: none;
    position: relative;
    z-index: 10; /* nad mapą, poniżej modala Bootstrap (~1050) */
}

.search-and-filters-container.category-dropdown-open {
    z-index: 1100; /* tylko gdy otwarta lista kategorii — nad mapą Leaflet */
}

/* Unified Collapsible Search Section */
.search-and-filters-container {
    transition: all 0.3s ease;
}

/* Default state - expanded (handled by HTML classes and inline styles) */

.unified-search-section {
    transition: all 0.3s ease;
}

.search-header {
    transition: background-color 0.2s ease;
    border-bottom: 1px solid #d5d5d5;
    border-radius: 6px 6px 0 0;
    background-color: #f0f0f0;
}

.search-header .search-title {
    font-size: 1.2rem;
}

/*
.search-and-filters-container.collapsed .search-header {
    background-color: white;
    border-bottom: 1px solid #dee2e6;
}

.search-and-filters-container.collapsed .search-header:hover {
    background-color: #e7e7e7; 
}
*/

.toggle-search-section {
    background-color: transparent;
    border: none;
    color: #6c757d; /* Gray text and icon */
    border-radius: 0;
    font-weight: 500;
    transition: all 0.2s ease;
    padding: 6px 12px;
    text-decoration: underline;
    box-shadow: none;
}

.toggle-search-section:hover {
    background-color: transparent;
    border: none;
    color: #495057;
    text-decoration: underline;
    box-shadow: none;
}

.toggle-search-section:focus,
.toggle-search-section:active {
    background-color: transparent;
    border: none;
    color: #495057;
    text-decoration: underline;
    box-shadow: none;
    box-shadow: 0 0 0 0.2rem rgba(108, 117, 125, 0.25);
}

.search-toggle-text {
    font-size: 0.9rem;
    font-weight: 600;
}

.search-content {
    transition: all 0.3s ease;
    overflow: hidden;
    display: block; /* Default to visible */
}

/* Search section states - controlled by JavaScript */
.search-and-filters-container.collapsed .search-content {
    display: none;
}

.search-and-filters-container.expanded .search-content {
    display: block;
    overflow: visible;
}

/* Compact Search Form */
.search-form-compact {
    border-bottom: 0px solid #f1f3f4;
    padding-bottom: 0;
}

.search-form-compact .home-category-select-field,
.search-form-compact .home-narrow-filter-field,
.search-form-compact .home-search-phrase-field {
    width: 100%;
    flex: 0 0 auto;
}

.home-category-dropdown {
    position: relative;
    width: 100%;
    z-index: 1;
}

.home-category-dropdown.is-open {
    z-index: 1200;
}

.home-category-dropdown-toggle {
    display: flex;
    align-items: center;
    cursor: pointer;
    background-image: none;
    padding-right: 2rem;
}

.home-category-dropdown-toggle::after {
    content: '';
    position: absolute;
    right: 0.75rem;
    top: 50%;
    width: 0.5rem;
    height: 0.5rem;
    margin-top: -0.35rem;
    border-right: 2px solid #6c757d;
    border-bottom: 2px solid #6c757d;
    transform: rotate(45deg);
    pointer-events: none;
}

.home-category-dropdown.is-open .home-category-dropdown-toggle::after {
    margin-top: -0.1rem;
    transform: rotate(-135deg);
}

.home-category-dropdown-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.home-category-dropdown-menu {
    position: absolute;
    top: calc(100% + 2px);
    left: 0;
    right: 0;
    z-index: 1200;
    max-height: 280px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.12);
    min-width: 220px;
}

.home-category-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    border: 0;
    background: transparent;
    padding: 0.4rem 0.65rem;
    text-align: left;
    font-size: 0.875rem;
    color: #212529;
    cursor: pointer;
}

.home-category-dropdown-item:hover,
.home-category-dropdown-item:focus {
    background-color: #f8f9fa;
    outline: none;
}

.home-category-dropdown-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
    flex-shrink: 0;
}

.home-category-dropdown-icon.pin-icon-head {
    width: 24px;
    height: 24px;
}

.home-category-dropdown-icon-fallback {
    width: 24px;
    text-align: center;
    color: #6c757d;
    flex-shrink: 0;
}

.home-category-dropdown-item-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (min-width: 768px) {
    .search-form-compact .home-category-select-field {
        flex: 0 0 200px;
        width: 200px;
        min-width: 80px;
        max-width: 200px;
    }

    .search-form-compact .home-narrow-filter-field {
        flex: 0 0 240px;
        width: 240px;
        min-width: 240px;
        max-width: 240px;
    }

    .search-form-compact .home-search-phrase-field {
        flex: 1 1 auto;
        width: auto;
        min-width: 0;
    }
}

.search-form-compact .form-label {
    color: #000;
    font-weight: 500;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.search-form-compact .form-control-sm {
    font-size: 0.875rem;
    padding: 0.25rem 0.5rem;
}

.search-form-compact .form-select-sm {
    font-size: 0.875rem;
    padding: 0.25rem 0.5rem;
}

.search-form-compact .btn-sm {
    font-size: 0.8rem;
    padding: 0.25rem 0.75rem;
    font-weight: 500;
}

.search-form-compact .d-flex {
    align-items: end;
}

/* Active Filters Section */
.active-filters-section h6 {
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
}

.active-filters-section {
    border-top: 1px solid #e9ecef;
    padding-top: 1rem;
}

/* Legacy Active Filters Top (for compatibility) */
.active-filters-top {
    border: 1px solid #dee2e6;
}

.active-filters-top h6 {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 1rem;
}

.category-filter-badge {
    font-size: 0.85rem;
    padding: 8px 12px;
    border-radius: 8px;
    background-color: #f8f9fa !important;
    color: #495057;
    border: 1px solid #dee2e6;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    white-space: normal;
    word-wrap: break-word;
}

.category-filter-badge .category-path {
    white-space: normal;
    word-wrap: break-word;
    line-height: 1.25;
    display: flex;
    align-items: center;
}

.category-filter-badge .category-filter-icon,
.category-filter-badge > i.fa-map-marker-alt {
    align-self: center;
}

.category-filter-badge:hover {
    background-color: #f0f0f0 !important;
    border-color: #adb5bd;
}

.category-filter-remove {
    width: 16px;
    height: 16px;
    opacity: 0.6;
    transition: all 0.2s ease;
    cursor: pointer;
    color: #6c757d;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: none;
    padding: 0;
    margin-left: 4px;
}

.category-filter-remove:hover {
    opacity: 1;
    color: #dc3545;
    transform: scale(1.1);
}

.category-filter-icon {
    width: 24px;
    height: 24px;
    border-radius: 2px;
    flex-shrink: 0;
    object-fit: contain;
}

/* Piny (grafika już w prawidłowej orientacji – bez odbicia CSS) */
.pin-icon {
    transition: transform 0.3s ease;
}

.category-tile-dynamic:hover .pin-icon,
.announcement-category-tile:hover .pin-icon {
    transform: scale(1.08);
}

/* Markery na mapie Leaflet */
.map-category-pin-wrapper {
    background: transparent;
    border: none;
}

.map-category-pin-wrapper .pin-icon {
    display: block;
}

.main-category-checkbox {
    margin-right: 12px;
}

/* Modal subcategories styling */
.subcategory-item {
    border: none !important;
}

.subcategory-checkbox {
    width: 22px;
    height: 22px;
    margin-right: 12px;
    margin-top: 2px;
    flex-shrink: 0;
    border: 2px solid #495057;
    border-radius: 4px;
}

.subcategory-checkbox:checked {
    background-color: #198754;
    border-color: #198754;
}

.subcategory-checkbox:focus {
    border-color: #198754;
    box-shadow: 0 0 0 0.2rem rgba(25, 135, 84, 0.25);
}

/* Form check layout for tree view */
.subcategory-item .form-check {
    display: flex;
    align-items: flex-start;
    margin-bottom: 0;
}

.subcategory-item .form-check-label {
    flex: 1;
    margin-bottom: 0;
    cursor: pointer;
    line-height: 1.4;
}

.subcategory-item .form-check-input {
    margin-top: 2px;
}

/* Modal full height and scroll optimization */
.modal-fullscreen-lg-down {
    max-height: 100vh;
}

.modal-fullscreen-lg-down .modal-content {
    max-height: 100vh;
    display: flex;
    flex-direction: column;
}

.modal-fullscreen-lg-down .modal-body {
    flex: 1;
    overflow-y: auto;
    max-height: calc(100vh - 120px); /* Account for header and footer */
}

.subcategories-list {
    max-height: 100%;
    overflow-y: auto;
}

/* Checkbox kategorii głównej w modalu podkategorii – większy, z odstępem od lewej */
.main-category-row {
    padding-left: 0.5rem;
}
.main-category-row .main-category-checkbox {
    width: 1.25rem;
    height: 1.25rem;
    margin-top: 0.15rem;
}

.subcategories-grid {
    display: flex;
    flex-direction: column;
    /*gap: 8px;*/
}

/* Tree view styling for subcategories */
.subcategories-grid {
    position: relative;
}

.subcategory-item {
    position: relative;
    margin-left: 0;
    padding: 12px 16px;
    border-radius: 8px;
    transition: background-color 0.2s ease;
}

.subcategory-item:hover {
    background-color: #f8f9fa;
}

/* Indentation for subcategories (no vertical/horizontal tree lines) */
.subcategory-item[data-level="1"] {
    margin-left: 0;
}

.subcategory-item[data-level="2"] {
    margin-left: 36px;
}

.subcategory-item[data-level="3"] {
    margin-left: 72px;
}

.subcategory-item[data-level="4"] {
    margin-left: 108px;
}

.subcategory-item[data-level="5"] {
    margin-left: 144px;
}

/* Level indicators - removed folder icons */

/* Description styling for tree view */
.subcategory-item p {
    margin-left: 28px; /* Align with text, not checkbox */
    margin-top: 4px;
    font-size: 0.85rem;
    line-height: 1.3;
    color: #6c757d;
}

/* Responsive tree view */
@media (max-width: 768px) {
    .subcategory-item[data-level="2"] {
        margin-left: 28px;
    }
    
    .subcategory-item[data-level="3"] {
        margin-left: 56px;
    }
    
    .subcategory-item[data-level="4"] {
        margin-left: 84px;
    }
    
    .subcategory-item[data-level="5"] {
        margin-left: 112px;
    }
}

.clear-all-filters {
    background-color: #f8d7da; /* Very light red background */
    border: 1px solid #dc3545; /* Red border */
    color: #dc3545; /* Red text */
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s ease;
    font-size: 0.85rem;
    padding: 6px 12px;
}

.clear-all-filters:hover {
    background-color: #f5c2c7; /* Slightly darker light red on hover */
    border-color: #b02a37;
    color: #b02a37;
}

.clear-all-filters:focus,
.clear-all-filters:active {
    background-color: #f5c2c7;
    border-color: #b02a37;
    color: #b02a37;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

/* Search Button - green theme */
.search-form button[type="submit"],
.search-form .btn-primary,
.search-form .btn-success,
.search-form-compact button[type="submit"],
.search-form-compact .btn-primary,
.search-form-compact .btn-success {
    background-color: #198754;
    border: 1px solid #198754;
    color: #fff;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.search-form button[type="submit"]:hover,
.search-form .btn-primary:hover,
.search-form .btn-success:hover,
.search-form-compact button[type="submit"]:hover,
.search-form-compact .btn-primary:hover,
.search-form-compact .btn-success:hover {
    background-color: #157347;
    border-color: #146c43;
    color: #fff;
}

.search-form button[type="submit"]:focus,
.search-form button[type="submit"]:active,
.search-form .btn-primary:focus,
.search-form .btn-primary:active,
.search-form .btn-success:focus,
.search-form .btn-success:active,
.search-form-compact button[type="submit"]:focus,
.search-form-compact button[type="submit"]:active,
.search-form-compact .btn-primary:focus,
.search-form-compact .btn-primary:active,
.search-form-compact .btn-success:focus,
.search-form-compact .btn-success:active {
    background-color: #157347;
    border-color: #146c43;
    color: #fff;
    box-shadow: 0 0 0 0.2rem rgba(25, 135, 84, 0.25);
}

/* Map Section */
.map-section {
    background-color: #f8f9fa;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.map-container {
    padding: 0;
    border: 1px solid #d5d5d5;
}

.map-category-hint {
    background: #fff;
    border-left: 1px solid #d5d5d5;
    border-right: 1px solid #d5d5d5;
}

.map-category-hint .alert {
    margin-bottom: 0;
}

.map-display {
    width: 100%;
    height: 100%;
    min-height: 400px;
    background-color: #e9ecef;
    border: 0px solid #d5d5d5;
    position: relative;
}

/* Map and Categories Custom Layout */
.map-section > .container-fluid {
    display: flex;
    flex-wrap: wrap;
    gap: 0px;
    align-items: flex-start;
    flex: 1;
    min-height: 0;
}

/* Komunikat globalny (np. po rejestracji) – pierwszy w sekcji, pełna szerokość nad wyszukiwarką */
.map-section .global-messages-top {
    flex: 0 0 100%;
    width: 100%;
    order: -1;
}

.map-section .sidebar-container {
    flex: 0 0 320px; /* Stała szerokość 320px */
    max-width: 320px;
}

.map-section .main-container {
    flex: 1; /* Zajmuje pozostałą przestrzeń */
    min-width: 0; /* Zapobiega overflow */
    display: flex;
    flex-direction: column;
    border: 0px solid #d5d5d5;
    border-radius: 8px;
}

/* Global Messages Styling */
#globalMessages {
    width: 100%;
    margin: 0;
    padding: 0;
}

#globalMessages.global-messages-top:not([style*="display: none"]) {
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

#globalMessages .alert {
    border-radius: 8px;
    margin: 0;
    border: 1px solid #c2c2c2;
}

.map-section .map-container {
    flex: 1; /* Mapa zajmuje całą dostępną przestrzeń w kolumnie */
    display: flex;
    flex-direction: column;
    overflow: hidden; /* Zapobiega przekroczeniu */
    border-radius: 0 0 8px 8px;
    min-height: 400px;
    position: relative;
    z-index: 1;
}

/* Ensure map display fills the container */
.map-section .map-display {
    flex: 1;
    min-height: 0;
}

/* Desktop: pełna wysokość viewport (mapa) */
@media (min-width: 992px) {
    .map-section {
        min-height: calc(100vh - 72px - 130px);
    }

    .map-section > .container-fluid {
        min-height: calc(100vh - 72px - 130px - 3rem);
    }

    .map-section .main-container {
        min-height: 100%;
    }

    .map-section .map-container {
        flex: 1 1 auto;
        min-height: 0;
    }
}

/* Sidebar Categories Tiles - No height restrictions on desktop */

/* Responsive layout for smaller screens */
@media (max-width: 991.98px) {
    .map-section {
        min-height: calc(100vh - 72px - 130px);
    }

    .map-section > .container-fluid {
        flex-direction: column;
        gap: 1rem;
        min-height: calc(100vh - 72px - 130px - 3rem);
    }
    
    .map-section .sidebar-container {
        display: none;
    }
    
    .map-section .main-container {
        width: 100%;
        display: flex;
        flex-direction: column;
        flex: 1 1 auto;
        min-height: 0;
    }
    
    .map-section .map-container {
        flex: 1 1 auto;
        min-height: 0;
    }
    
    .map-section .map-display {
        flex: 1;
        min-height: 400px;
    }
}

/* Dymek markera na mapie (Leaflet popup) */
.leaflet-popup.map-marker-leaflet-popup .leaflet-popup-content-wrapper {
    border-radius: 0.5rem;
    padding: 0;
    overflow: hidden;
}

.leaflet-popup.map-marker-leaflet-popup .leaflet-popup-content {
    margin: 0 0 12px;
    width: 350px !important;
    max-width: 350px;
    padding: 0;
}

.leaflet-popup.map-marker-leaflet-popup a.leaflet-popup-close-button {
    width: 36px;
    height: 36px;
    font-size: 28px;
    line-height: 36px;
    padding: 0;
    top: 6px;
    right: 6px;
    text-align: center;
    z-index: 3;
    color: #212529;
    background-color: #fff;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    text-decoration: none;
}

.leaflet-popup.map-marker-leaflet-popup a.leaflet-popup-close-button:hover {
    background-color: #fff;
    color: #000;
}

.leaflet-popup-content .map-marker-popup {
    width: 100%;
    max-width: 100%;
    font-size: 0.95rem;
    line-height: 1.35;
}

.leaflet-popup-content .map-marker-popup--no-image {
    padding-top: 44px;
}

.leaflet-popup-content .map-marker-popup__title {
    font-size: 1.05rem;
    font-weight: 600;
    color: #212529;
    margin: 0 0 0.35rem;
    padding: 0 12px;
    word-break: break-word;
}

.leaflet-popup-content .map-marker-popup__image {
    margin: 0 0 0.5rem;
}

.leaflet-popup-content .map-marker-popup__image img {
    display: block;
    width: 100%;
    max-width: none;
    height: 100px;
    object-fit: cover;
    border-radius: 0;
}

.leaflet-popup-content .map-marker-popup__personal {
    font-size: 0.85rem;
    font-weight: 600;
    color: #212529;
    margin: 0 0 0.1rem;
    padding: 0 12px;
    white-space: pre-line;
    word-break: break-word;
}

.leaflet-popup-content .map-marker-popup__summary {
    font-size: 0.9rem;
    color: #495057;
    margin-bottom: 0.65rem;
    padding: 0 12px;
    white-space: pre-line;
    word-break: break-word;
}

.leaflet-popup-content .map-marker-popup__actions {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.35rem;
    justify-content: stretch;
    align-items: stretch;
    padding: 0 12px;
}

.leaflet-popup-content .map-marker-popup__actions--secondary {
    margin-top: 0.4rem;
}

.leaflet-popup-content .map-marker-popup__actions > .btn,
.leaflet-popup-content .map-marker-popup__actions > a.btn {
    flex: 1 1 0;
    min-width: 0;
    padding-left: 0.35rem;
    padding-right: 0.35rem;
    font-size: 0.75rem;
    white-space: nowrap;
    text-align: center;
}

.leaflet-popup-content .map-marker-popup__actions--secondary > .btn {
    flex: 1 1 100%;
    white-space: normal;
}

.leaflet-popup-content .map-popup-btn-details {
    background-color: #6c757d;
    border-color: #6c757d;
    color: #fff;
}

.leaflet-popup-content .map-popup-btn-details:hover,
.leaflet-popup-content .map-popup-btn-details:focus {
    background-color: #5c636a;
    border-color: #565e64;
    color: #fff;
}

.leaflet-popup-content .map-popup-btn-call {
    background-color: #198754;
    border-color: #198754;
    color: #fff;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.leaflet-popup-content .map-popup-btn-call:hover,
.leaflet-popup-content .map-popup-btn-call:focus {
    background-color: #157347;
    border-color: #146c43;
    color: #fff;
}

.leaflet-popup-content .map-popup-btn-phone-hours {
    background-color: #fff;
    border: 2px solid #dc3545;
    color: #dc3545;
}

.leaflet-popup-content .map-popup-btn-phone-hours:hover,
.leaflet-popup-content .map-popup-btn-phone-hours:focus {
    background-color: #fff;
    border-color: #bb2d3b;
    color: #bb2d3b;
}

.leaflet-popup-content .map-popup-btn-directions {
    background-color: #6c757d;
    border-color: #6c757d;
    color: #fff;
}

.leaflet-popup-content .map-popup-btn-directions:hover,
.leaflet-popup-content .map-popup-btn-directions:focus {
    background-color: #5c636a;
    border-color: #565e64;
    color: #fff;
}

/* Lista wyboru przy nakładających się pinach */
.leaflet-popup.map-overlap-chooser-popup .leaflet-popup-content-wrapper {
    border-radius: 0.5rem;
    padding: 0;
    overflow: hidden;
}

.leaflet-popup.map-overlap-chooser-popup .leaflet-popup-content {
    margin: 0;
    padding: 0;
    width: 260px !important;
    max-width: 260px;
}

.map-overlap-chooser {
    padding: 0.75rem 0.65rem 0.65rem;
}

.map-overlap-chooser__title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #212529;
    margin: 0 0 0.55rem;
    padding: 0 0.25rem;
}

.map-overlap-chooser__list {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    max-height: 240px;
    overflow-y: auto;
}

.map-overlap-chooser__item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.1rem;
    width: 100%;
    text-align: left;
    border: 1px solid #ced4da;
    border-radius: 0.4rem;
    background: #fff;
    color: #212529;
    padding: 0.55rem 0.65rem;
    cursor: pointer;
    line-height: 1.25;
}

.map-overlap-chooser__item:hover,
.map-overlap-chooser__item:focus {
    border-color: #0d6efd;
    background: #f8f9fa;
    outline: none;
}

.map-overlap-chooser__label {
    font-size: 0.9rem;
    font-weight: 600;
    word-break: break-word;
}

.map-overlap-chooser__meta {
    font-size: 0.78rem;
    color: #6c757d;
    word-break: break-word;
}

.map-phone-hours-dialog .map-phone-hours-row {
    margin-bottom: 0.35rem;
    font-size: 0.95rem;
}

/* Sidebar specific styles for category tiles */
.sidebar-categories-tiles .category-tile-dynamic {
    cursor: pointer;
    transition: all 0.3s ease;
}

.sidebar-categories-tiles .category-tile-dynamic:hover {
    transform: translateY(0px) translateX(0px);
    border-color: #a8a8a8;
}

.sidebar-categories-tiles .category-tile-dynamic.active {
    border-color: #28a745;
    background-color: #f8fff8;
}

.sidebar-tile-indicator {
    min-width: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    font-size: 0.9rem;
}

/* Category Tree */
.category-tree {
    font-size: 0.9rem;
}

.category-item {
    margin-bottom: 2px;
}

.category-header {
    transition: background-color 0.2s ease;
    border-radius: 4px;
    cursor: pointer;
}

.category-header:hover {
    background-color: #f8f9fa;
}


.category-name {
    font-weight: 500;
    color: #333;
}

.category-name:hover {
    color: #007bff;
}

/* Expand icon - now positioned on the right */
.expand-icon {
    transition: transform 0.2s ease;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.expand-icon.expanded {
    transform: rotate(90deg);
}

/* Ads count badges for main categories */
.ads-count {
    font-size: 0.75rem;
    font-weight: 600;
    background-color: #6c757d !important;
    border: none;
    padding: 4px 8px;
    text-align: center;
}

.category-children {
    border-left: 1px solid #e9ecef;
    padding-left: 8px;
    margin-top: 4px;
}

.category-item[data-level="1"] .category-name {
    font-size: 0.85rem;
    font-weight: 400;
}

.category-item[data-level="2"] .category-name {
    font-size: 0.8rem;
    font-weight: 400;
    color: #666;
}

/* Info Section */
.info-section {
    background-color: #f8f9fa;
}

.info-section .badge {
    font-size: 0.75rem;
    font-weight: normal;
    border: 1px solid #dee2e6;
}

/* Buttons */
.btn-warning {
    background-color: #ffc107;
    border-color: #ffc107;
    color: #212529;
    font-weight: 500;
}

.btn-warning:hover {
    background-color: #e0a800;
    border-color: #d39e00;
}

/* Responsive */
@media (max-width: 768px) {
    .jumbotron {
        padding: 1rem;
    }
    
    .card {
        margin-bottom: 1rem;
    }
    
    .search-form-container {
        padding: 1.5rem 1rem;
    }
    
    .search-and-filters-container {
        padding: 0 !important;
        border: 1px solid #d5d5d5;
    }
    
    /* Search header responsive */
    .search-and-filters-container .card-header {
        flex-direction: row !important;
        flex-wrap: wrap;
        align-items: center !important;
        justify-content: space-between;
        padding: 0.75rem 1rem;
        gap: 0.5rem;
        min-height: auto;
    }
    
    .search-and-filters-container .card-header > div:first-child {
        flex: 1;
        min-width: 0;
    }
    
    .search-and-filters-container .card-header .card-title {
        font-size: 0.95rem;
        margin: 0;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    .search-and-filters-container .toggle-search-section {
        margin: 0;
        white-space: nowrap;
        flex-shrink: 0;
        font-size: 0.85rem;
    }
    
    .search-and-filters-container .toggle-search-section .search-toggle-text {
        display: inline-block;
    }
    
    .search-and-filters-container .toggle-search-section .search-toggle-icon {
        font-size: 0.75rem;
    }
    
    .search-form-compact form {
        flex-direction: column !important;
        gap: 1rem !important;
        align-items: stretch !important;
    }
    
    .search-form-compact form > div {
        width: 100% !important;
        min-width: 0 !important;
        max-width: none !important;
        flex: 0 0 auto !important;
        height: auto !important;
    }
    
    .search-form-compact .home-category-select-field,
    .search-form-compact .home-narrow-filter-field,
    .search-form-compact .home-search-phrase-field {
        width: 100% !important;
        flex: 0 0 auto !important;
    }
    
    .search-form-compact .input-group {
        width: 100% !important;
        flex-wrap: nowrap;
    }

    .search-form-compact .input-group .btn-success {
        white-space: nowrap;
        flex-shrink: 0;
    }
    
    .search-content {
        padding: 1rem !important;
    }
    
    .map-display {
        min-height: 400px; /* Minimalna wysokość na średnich ekranach */
    }
    
    .categories-sidebar {
        max-height: 400px;
        margin-bottom: 1rem;
    }
    
    .active-filters-top {
        margin-bottom: 1rem;
    }
    
    
    .category-filter-badge {
        font-size: 0.8rem;
        width: calc((100% - 0.5rem) / 2);
        max-width: calc((100% - 0.5rem) / 2);
        box-sizing: border-box;
        justify-content: flex-start;
        text-align: left;
        align-items: center;
        align-self: stretch;
        height: auto;
        min-height: 100%;
    }

    .category-filter-badge .category-path {
        text-align: left;
        flex: 1 1 auto;
        min-width: 0;
    }

    .category-filter-badge .category-filter-remove {
        margin-left: auto;
        flex-shrink: 0;
    }

    .active-filters-section .d-flex {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.5rem;
        align-items: stretch !important;
    }

    .active-filters-section .clear-all-filters {
        width: 100%;
        flex: 1 0 100%;
    }
    
    .navbar .btn:not(.btn-navbar-map) {
        font-size: 0.8rem;
        margin: 0.25rem;
        width: 100%;
        text-align: center;
    }
    
    .navbar-nav {
        width: 100%;
    }
    
    .navbar-nav .nav-item {
        width: 100%;
        margin-bottom: 0.5rem;
    }
}

@media (max-width: 576px) {
    .search-form-container .d-flex,
    .search-form-compact .d-flex {
        flex-direction: column;
    }
    
    .search-form-compact .d-flex > div {
        min-width: 0 !important;
        max-width: none !important;
        flex: 0 0 auto !important;
        width: 100% !important;
        height: auto !important;
    }
    
    .map-display {
        min-height: 300px; /* Minimalna wysokość na małych ekranach */
    }
    
    .active-filters-top .d-flex,
    .active-filters-section .d-flex {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.5rem;
        align-items: stretch !important;
    }
    
    .category-filter-badge {
        width: calc((100% - 0.5rem) / 2);
        max-width: calc((100% - 0.5rem) / 2);
        box-sizing: border-box;
        justify-content: flex-start;
        text-align: left;
        margin-bottom: 0;
        align-items: center;
        align-self: stretch;
        height: auto;
        min-height: 100%;
        padding: 10px 12px;
    }

    .category-filter-badge .category-path {
        text-align: left;
        flex: 1 1 auto;
        min-width: 0;
    }

    .category-filter-badge .category-filter-remove {
        margin-left: auto;
        flex-shrink: 0;
    }
    
    .clear-all-filters {
        width: 100%;
        flex: 1 0 100%;
        margin-top: 0.25rem;
    }
}

/* ===================================== */
/* Categories Tiles Section              */
/* ===================================== */

.categories-tiles-section {
    background-color: #f8f9fa;
    border-top: 1px solid #e9ecef;
    border-bottom: 1px solid #e9ecef;
}

/* Dynamic Category Tiles with Flexbox */
.categories-flex-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: flex-start;
    align-items: flex-start;
}

.category-tile-dynamic {
    transition: all 0.3s ease;
    border: 1px solid #d5d5d5;
    cursor: pointer;
    width: 300px;
    flex: 0 0 auto;
    background-color: #ffffff;
}

.category-tile-dynamic:hover {
    border-color: #007bff;
    background-color: #f4f4f4;
}

.tile-header {
    align-items: flex-start;
}

.category-pin {
    min-width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pin-icon {
    max-width: 32px;
    max-height: 40px;
    object-fit: contain;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.1));
}

.sidebar-categories-tiles .pin-icon-head {
    width: 40px;
    height: 40px;
    max-width: 40px;
    max-height: 40px;
}

.pin-placeholder {
    width: 32px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa;
    border-radius: 6px;
    border: 2px dashed #dee2e6;
}

.pin-placeholder i {
    font-size: 1.4rem;
    color: #6c757d;
}

.tile-info {
    min-width: 0;
}

.tile-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: #333;
    line-height: 1.3;
    margin: 0;
    /* Remove text truncation - allow full names */
    word-wrap: break-word;
    hyphens: auto;
}

.advertisement-details__title-row {
    gap: 0.85rem;
}

.advertisement-details__head-icon {
    flex: 0 0 auto;
}

.advertisement-details__head-img {
    display: block;
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.announcement-details-page .advertisement-details__head-img {
    width: 56px;
    height: 56px;
}

.announcement-details-page .advertisement-details__head-fallback {
    font-size: 2rem;
}

.announcement-details-page .announcement-details-summary {
    font-size: 0.95rem;
    line-height: 1.45;
}

.announcement-details-top {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem 1rem;
}

.announcement-details-top__main {
    min-width: 0;
    flex: 1 1 220px;
}

.announcement-details-top__badges {
    flex: 0 1 auto;
    justify-content: flex-end;
    margin-left: auto;
}

.announcement-details-card {
    box-shadow: none !important;
}

@media (max-width: 767.98px) {
    .announcement-details-top__badges {
        width: 100%;
        justify-content: flex-start;
        margin-left: 0;
    }
}

.advertisement-details__title-block {
    min-width: 0;
    flex: 1 1 auto;
}

.advertisement-details__personal {
    font-size: 0.9rem;
    font-weight: 600;
    color: #212529;
    line-height: 1.3;
    margin-bottom: 0.15rem;
    white-space: pre-line;
    word-break: break-word;
}

.advertisement-details__separator {
    margin: 0.75rem 0;
    border: 0;
    border-top: 1px solid #dee2e6;
    opacity: 1;
}

.advertisement-details__title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #212529;
    line-height: 1.35;
    margin: 0;
    word-wrap: break-word;
}

.advertisement-details__category-path {
    display: flex;
    flex-wrap: wrap;
    column-gap: 15px;
    row-gap: 15px;
    font-size: 0.8rem;
    color: #6c757d;
    line-height: 1.35;
    margin: 0 0 1.15rem;
    word-break: break-word;
}

.advertisement-details__category-path-item {
    flex: 0 1 auto;
}

@media (max-width: 767.98px) {
    .advertisement-details__category-path {
        row-gap: 4px;
    }
}

.advertisement-details__description {
    margin-top: 1rem;
}

.advertisement-details__report {
    display: flex;
    justify-content: flex-end;
}

.advertisement-details__report .advertisement-report-abuse-btn.disabled,
.advertisement-details__report .advertisement-report-abuse-btn:disabled {
    opacity: 0.65;
    pointer-events: none;
}

.tile-count {
    font-size: 0.8rem;
    color: #6c757d;
    font-weight: 500;
}

.tile-actions {
    margin-top: auto;
}

.tile-actions .btn-sm {
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: 6px;
    padding: 8px 12px;
}

.add-to-filter-btn {
    background-color: #007bff;
    border-color: #007bff;
    color: white;
}

.add-to-filter-btn:hover {
    background-color: #0056b3;
    border-color: #0056b3;
    transform: scale(1.02);
}

.open-subcategories-btn {
    color: #6c757d;
    border-color: #dee2e6;
    background-color: transparent;
    transition: all 0.2s ease;
    min-width: 40px;
}

.open-subcategories-btn:hover {
    background-color: #e9ecef;
    border-color: #adb5bd;
    color: #495057;
    transform: scale(1.02);
}

/* ===================================== */
/* Subcategories Modal                   */
/* ===================================== */

.subcategories-tree {
    /*max-height: 400px;*/
    overflow-y: auto;
}

.subcategories-tree::-webkit-scrollbar {
    width: 8px;
}

.subcategories-tree::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.subcategories-tree::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.subcategories-tree::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.modal-subcategory-item {
    border: 1px solid #e9ecef;
    border-radius: 6px;
    margin-bottom: 8px;
    transition: all 0.2s ease;
}

.modal-subcategory-item:hover {
    border-color: #007bff;
    background-color: #f8f9fa;
}

.modal-subcategory-header {
    padding: 12px;
    cursor: pointer;
    user-select: none;
}

.modal-subcategory-name {
    font-weight: 500;
    color: #333;
    flex-grow: 1;
}

.modal-subcategory-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.modal-subcategory-actions .btn {
    font-size: 0.75rem;
    padding: 4px 8px;
}

.modal-subcategory-children {
    border-top: 1px solid #e9ecef;
    background-color: #fafbfc;
    padding: 8px 12px;
}

.modal-expand-icon {
    transition: transform 0.2s ease;
    color: #6c757d;
    font-size: 0.8rem;
}

.modal-expand-icon.expanded {
    transform: rotate(90deg);
}

/* Responsive adjustments for dynamic tiles */
@media (max-width: 768px) {
    .categories-flex-container {
        gap: 12px;
        justify-content: center;
    }
    
    .category-tile-dynamic {
        min-width: 180px;
        max-width: 220px;
    }
    
    .pin-icon {
        max-width: 28px;
        max-height: 35px;
    }
    
    .pin-placeholder {
        width: 28px;
        height: 35px;
    }
    
    .pin-placeholder i {
        font-size: 1.2rem;
    }
    
    .tile-name {
        font-size: 0.9rem;
    }
    
    .tile-count {
        font-size: 0.75rem;
    }
    
    .tile-actions .btn-sm {
        font-size: 0.8rem;
        padding: 6px 10px;
    }
}

@media (max-width: 576px) {
    .categories-tiles-section {
        padding: 2rem 0 !important;
    }
    
    .categories-tiles-section h4 {
        font-size: 1.3rem;
        margin-bottom: 1.5rem !important;
    }
    
    .categories-flex-container {
        gap: 10px;
        justify-content: center;
    }
    
    .category-tile-dynamic {
        min-width: 160px;
        padding: 0.4rem !important;
    }
    
    .tile-header {
        margin-bottom: 0rem !important;
    }
    
    .category-pin {
        min-width: 32px;
    }
    
    .pin-icon {
        max-width: 24px;
        max-height: 30px;
    }
    
    .pin-placeholder {
        width: 24px;
        height: 30px;
    }
    
    .pin-placeholder i {
        font-size: 1rem;
    }
    
    .tile-name {
        font-size: 0.85rem;
        line-height: 1.2;
    }
    
    .tile-count {
        font-size: 0.7rem;
    }
    
    .tile-actions .btn-sm {
        font-size: 0.75rem;
        padding: 5px 8px;
    }
    
    .tile-actions {
        gap: 1rem !important;
    }
    
    /* Sidebar tiles responsive - no height restrictions on mobile */
    
    .sidebar-categories-tiles .category-tile-dynamic {
        margin-bottom: 1rem !important;
        padding: 2rem !important;
        min-height: 100px;
    }
    
    .sidebar-categories-tiles .tile-header {
        margin-bottom: 1rem !important;
    }
    
    .sidebar-categories-tiles .pin-icon {
        max-width: 28px;
        max-height: 35px;
    }

    .sidebar-categories-tiles .pin-icon-head {
        width: 40px;
        height: 40px;
        max-width: 40px;
        max-height: 40px;
    }
    
    .sidebar-categories-tiles .pin-placeholder {
        width: 28px;
        height: 35px;
    }
    
    .sidebar-categories-tiles .tile-name {
        font-size: 0.9rem;
    }
    
    .sidebar-categories-tiles .tile-count {
        font-size: 0.75rem;
    }
    
    .sidebar-tile-indicator {
        font-size: 0.8rem;
    }
}

/* Customer dropdown menu positioning */
.navbar .dropdown-menu {
    border: 1px solid rgba(0,0,0,.15);
    border-radius: 0.5rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    margin-top: 0.25rem;
    min-width: 200px;
    display: none;
    position: absolute;
    z-index: 1000;
}

/* Show dropdown when active - with higher specificity */
.navbar .dropdown-menu.show,
.dropdown-menu.show {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Zapewnienie że dropdown nie wychodzi poza prawą stronę */
.navbar .dropdown-menu.dropdown-menu-end {
    right: 0;
    left: auto;
}

/* Styling dropdown items */
.navbar .dropdown-item {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    color: #333;
    transition: all 0.2s ease;
}

.navbar .dropdown-item:hover {
    background-color: #f8f9fa;
    color: #007bff;
}

.navbar .dropdown-item i {
    width: 16px;
    text-align: center;
}

/* Mobile menu top buttons - hidden on desktop */
.mobile-menu-top-buttons {
    display: none;
}

/* Mobile menu categories - hidden on desktop */
.mobile-menu-categories {
    display: none;
}

/* Responsive positioning dla małych ekranów */
@media (max-width: 991.98px) {
    .navbar {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        width: 100%;
        z-index: 1051;
        background-attachment: scroll;
    }

    body.has-mobile-fixed-navbar {
        padding-top: var(--navbar-height, 72px);
    }

    .profile-sidebar {
        display: none !important;
    }
    
    /* Hide desktop buttons on mobile */
    .navbar-nav .nav-item:not(.d-none) {
        display: none !important;
    }
    
    /* Show mobile menu top buttons */
    .mobile-menu-top-buttons {
        display: block;
        width: 100%;
        padding: 1rem 0;
        margin-bottom: 1rem;
    }
    
    .mobile-menu-top-buttons-inner {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .mobile-menu-top-buttons-inner .btn {
        flex: 1 1 auto;
        min-width: fit-content;
    }
    
    /* Logout button styling in mobile menu */
    .mobile-menu-top-buttons-inner .btn[href="/logout"] {
        background-color: #ffcccc; /* Light red background */
        border-color: #dc3545; /* Dark red border */
        color: #8b0000; /* Dark red text */
    }
    
    .mobile-menu-top-buttons-inner .btn[href="/logout"]:hover {
        background-color: #ffaaaa; /* Slightly darker light red on hover */
        border-color: #bb2d3b;
        color: #6b0000; /* Darker red text on hover */
    }
    
    .mobile-menu-top-buttons-inner .btn[href="/logout"]:focus,
    .mobile-menu-top-buttons-inner .btn[href="/logout"]:active {
        background-color: #ffaaaa;
        border-color: #bb2d3b;
        color: #6b0000;
        box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
    }
    
    /* Mobile menu categories section */
    .mobile-menu-categories {
        display: block;
        width: 100%;
        padding: 1rem 0;
        border-top: 1px solid #6c757d;
        margin-top: 1rem;
    }
    
    .mobile-menu-categories-title {
        font-size: 1rem;
        font-weight: 600;
        margin-bottom: 1rem;
        color: #212529;
        text-align: center;
    }
    
    .mobile-menu-categories-list {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .mobile-category-btn {
        width: auto !important;
        padding: 0.75rem 1rem;
        border: 1px solid #6c757d;
        border-radius: 8px;
        background-color: #ffffff;
        transition: all 0.2s ease;
    }
    
    .mobile-category-btn:hover {
        background-color: #f8f9fa;
        border-color: #007bff;
        color: #007bff;
    }
    
    .mobile-category-btn img {
        object-fit: contain;
    }
    
    /* Mobile menu full screen overlay */
    .navbar-collapse {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100vw;
        height: 100vh;
        background-color: rgba(243, 243, 243, 0.95);
        z-index: 1050;
        padding: 100px 1.5rem 1.5rem 1.5rem;
        overflow-y: auto;
        margin: 0;
        border: none;
        box-shadow: none;
    }
    
    .navbar-collapse.show {
        display: block !important;
        background-color: rgba(243, 243, 243, 0.95);
    }
    
    .navbar-collapse.collapsing {
        height: 100vh !important;
    }
    
    /* Close button for mobile menu */
    .navbar-toggler {
        position: relative;
        z-index: 1051;
        flex-shrink: 0;
        margin-left: 0.5rem;
        background-color: transparent;
        border: 1px solid rgba(0,0,0,0.1);
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0;
    }

    /* Przycisk mapa — bez rozciągania, zawsze za logo */
    .navbar-brand-group {
        flex: 0 1 auto;
        width: auto;
        max-width: calc(100% - 3.5rem);
        margin-right: auto;
    }

    .navbar .btn-navbar-map,
    .navbar .btn.btn-navbar-map {
        background-color: #fff !important;
        border: 1px solid #dee2e6 !important;
        color: #6c757d !important;
        border-radius: 8px !important;
        padding: 8px 16px !important;
        font-size: 0.9rem !important;
        width: auto !important;
        max-width: none !important;
        flex: 0 0 auto !important;
        margin: 0 !important;
    }
    
    .navbar-toggler-icon {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(0, 0, 0, 0.5)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
        background-position: center;
        background-repeat: no-repeat;
        background-size: 100%;
        display: block;
        width: 30px;
        height: 30px;
        margin: 0;
        padding: 0;
        position: relative;
    }
    
    .navbar-toggler-icon i {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        font-size: 1.5rem;
        color: rgba(0, 0, 0, 0.5);
        line-height: 1;
        display: block;
        margin: 0;
        padding: 0;
    }
    
    /* Mobile menu dropdown */
    .navbar .dropdown-menu {
        position: static !important;
        transform: none !important;
        border: none;
        box-shadow: none;
        background-color: transparent;
        width: 100%;
    }
    
    .navbar .dropdown-item {
        padding: 0.75rem 1rem;
        border-bottom: 1px solid rgba(0,0,0,0.1);
        background-color: #f8f9fa;
        margin-bottom: 2px;
        border-radius: 0.25rem;
    }
    
    /* Mobile menu buttons styling */
    .mobile-menu-top-buttons .btn {
        width: 100%;
        margin: 0;
        text-align: center;
    }
    
    /* Ensure mobile dropdown menu is full width */
    #navbarDropdownMenuMobile {
        width: 100% !important;
    }
}

/* Login Form Styling */
#loginModal .form-control {
    font-size: 1rem;
    padding: 0;
    padding-left: 10px;
    border: 1px solid #198754; /* Green border */
    border-radius: 8px;
    font-weight: 500;
}

#loginModal .form-control#loginUsername {
    border-radius: 0 8px 8px 0;
}

#loginModal .form-control#loginPassword {
    border-radius: 0;
}

#loginModal .form-control:focus {
    border-color: #198754;
}

#loginModal .input-group-text {
    font-size: 0.9rem;
    padding: 12px 16px;
    border: 2px solid #198754; /* Green border */
    border-right: none;
    background-color: #198754; /* Very light green background */
    color: #e8f5e8; /* Green icon color */
}

#loginModal .input-group .form-control {
    border-left: none;
}

/* Password toggle button (eye icon) */
#loginModal #toggleLoginPassword {
    background-color: #e8f5e8; /* Very light green background */
    border: 1px solid #198754; /* Green border */
    color: #198754; /* Green icon color */
    border-radius: 0 8px 8px 0;
    padding: 12px 16px;
    transition: all 0.2s ease;
}

#loginModal #toggleLoginPassword:hover {
    background-color: #d4edda; /* Slightly darker light green on hover */
    border-color: #157347;
    color: #157347;
}

#loginModal #toggleLoginPassword:focus,
#loginModal #toggleLoginPassword:active {
    background-color: #d4edda;
    border-color: #157347;
    color: #157347;
    box-shadow: 0 0 0 0.2rem rgba(25, 135, 84, 0.25);
}

#loginModal .btn-primary {
    background-color: #e8f5e8; /* Very light green background */
    border: 1px solid #198754; /* Green border */
    color: #198754; /* Green text */
    border-radius: 8px;
    font-weight: 500;
    padding: 12px 24px;
    font-size: 1rem;
    transition: all 0.2s ease;
}

#loginModal .btn-primary:hover {
    background-color: #d4edda; /* Slightly darker light green on hover */
    border-color: #157347;
    color: #157347;
}

#loginModal .btn-primary:focus,
#loginModal .btn-primary:active {
    background-color: #d4edda;
    border-color: #157347;
    color: #157347;
    box-shadow: 0 0 0 0.2rem rgba(25, 135, 84, 0.25);
}

/* Modal footer links */
#loginModal .modal-footer a {
    color: #198754 !important; /* Dark green color */
    font-weight: 700;
    transition: all 0.2s ease;
}

#loginModal .modal-footer a:hover {
    color: #157347 !important; /* Darker green on hover */
    text-decoration: underline !important;
}

/* Login form checkbox styling */
#loginModal .form-check-input {
    width: 25px;
    height: 25px;
    border: 2px solid #198754;
    border-radius: 4px;
    background-color: #ffffff;
    cursor: pointer;
}

/* Increased spacing around checkbox */
#loginModal .form-check {
    margin-bottom: 1.5rem; /* Increased spacing below checkbox */
}

#loginModal .mb-3:last-of-type {
    margin-bottom: 1.5rem; /* Increased spacing above submit button */
}

#loginModal .form-check-input:checked {
    background-color: #198754;
    border-color: #198754;
}

#loginModal .form-check-input:focus {
    box-shadow: 0 0 0 0.2rem rgba(25, 135, 84, 0.25);
    border-color: #198754;
}

/* Login form labels */
#loginModal .form-label {
    color: #000;
    font-weight: 500;
    margin-bottom: 8px;
    font-size: 1rem;
}

/* Login form labels - stars in label color */
#loginModal .form-label .text-danger {
    color: inherit !important; /* Use label text color instead of red */
}

/* Login form checkbox label */
#loginModal .form-check-label {
    color: #000;
    font-weight: 500;
    font-size: 1rem;
}

/* Form validation styling */
#loginModal .form-control.is-invalid {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

#loginModal .form-control.is-valid {
    border-color: #198754;
    box-shadow: 0 0 0 0.2rem rgba(25, 135, 84, 0.25);
}

#loginModal .invalid-feedback {
    display: block;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: #dc3545;
}

#loginModal .valid-feedback {
    display: block;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: #198754;
}

/* Manual modal support */
.modal.show {
    display: block !important;
}

.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1040;
    width: 100vw;
    height: 100vh;
    background-color: #000;
    opacity: 0.5;
}

#subcategoriesModal.show {
    z-index: 1055;
}

body.modal-open {
    overflow: hidden;
}

/* Login form improvements */
.form-check.d-flex {
    margin-left: 0;
}

.form-check-label.ms-3 {
    margin-left: 15px !important;
}

/* Input group styling for login form */
.input-group:focus-within {
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    border-radius: 0.375rem;
}

.input-group:focus-within .input-group-text {
    border-color: #80bdff;
}

.input-group:focus-within .form-control {
    border-color: #80bdff;
    box-shadow: none;
}

.input-group:focus-within .btn {
    border-color: #80bdff;
}

/* Error state for input groups */
.input-group.is-invalid .input-group-text {
    border-color: #dc3545;
}

.input-group.is-invalid .form-control {
    border-color: #dc3545;
}

.input-group.is-invalid .btn {
    border-color: #dc3545;
}

/* Valid state for input groups */
.input-group.is-valid .input-group-text {
    border-color: #28a745;
}

.input-group.is-valid .form-control {
    border-color: #28a745;
}

.input-group.is-valid .btn {
    border-color: #28a745;
}

/* Registration Form Styling - matching login form */
#registerModal .form-control {
    font-size: 1rem;
    padding: 0;
    padding-left: 10px;
    border: 1px solid #198754; /* Green border */
    border-radius: 8px;
    font-weight: 500;
}

/* Input next to icon: no left radius; with password toggle: no radius at all */
#registerModal .input-group > .form-control {
    border-radius: 0 8px 8px 0;
}

#registerModal .input-group > .form-control:not(:last-child) {
    border-radius: 0;
}

#registerModal .form-control:focus {
    border-color: #198754;
}

#registerModal .input-group-text {
    font-size: 0.9rem;
    padding: 12px 16px;
    border: 2px solid #198754; /* Green border */
    border-right: none;
    background-color: #198754; /* Green background */
    color: #e8f5e8; /* Light green icon color */
    border-radius: 8px 0 0 8px;
}

#registerModal .input-group .form-control {
    border-left: none;
}

/* Password toggle buttons for registration */
#registerModal #toggleRegisterPassword,
#registerModal #toggleRegisterPasswordConfirm {
    background-color: #e8f5e8; /* Very light green background */
    border: 1px solid #198754; /* Green border */
    color: #198754; /* Green icon color */
    border-radius: 0 8px 8px 0;
    padding: 12px 16px;
    transition: all 0.2s ease;
}

#registerModal #toggleRegisterPassword:hover,
#registerModal #toggleRegisterPasswordConfirm:hover {
    background-color: #d4edda; /* Slightly darker light green on hover */
    border-color: #157347;
    color: #157347;
}

#registerModal #toggleRegisterPassword:focus,
#registerModal #toggleRegisterPassword:active,
#registerModal #toggleRegisterPasswordConfirm:focus,
#registerModal #toggleRegisterPasswordConfirm:active {
    background-color: #d4edda;
    border-color: #157347;
    color: #157347;
    box-shadow: 0 0 0 0.2rem rgba(25, 135, 84, 0.25);
}

#registerModal .btn-primary {
    background-color: #e8f5e8; /* Very light green background */
    border: 1px solid #198754; /* Green border */
    color: #198754; /* Green text */
    border-radius: 8px;
    font-weight: 500;
    padding: 12px 24px;
    font-size: 1rem;
    transition: all 0.2s ease;
    margin-top: 20px;
}

#registerModal .btn-primary:hover {
    background-color: #d4edda; /* Slightly darker light green on hover */
    border-color: #157347;
    color: #157347;
}

#registerModal .btn-primary:focus,
#registerModal .btn-primary:active {
    background-color: #d4edda;
    border-color: #157347;
    color: #157347;
    box-shadow: 0 0 0 0.2rem rgba(25, 135, 84, 0.25);
}

/* Registration modal footer links */
#registerModal .modal-footer a {
    color: #198754 !important; /* Dark green color */
    font-weight: 700;
    transition: all 0.2s ease;
}

#registerModal .modal-footer a:hover {
    color: #157347 !important; /* Darker green on hover */
    text-decoration: underline !important;
}

/* Registration form labels */
#registerModal .form-label {
    color: #000;
    font-weight: 500;
    margin-bottom: 8px;
    font-size: 1rem;
}

/* Registration form labels - stars in label color */
#registerModal .form-label .text-danger {
    color: inherit !important; /* Use label text color instead of red */
}

/* Registration form text muted */
#registerModal .text-muted {
    color: #6c757d !important;
}

#registerModal .text-muted a {
    color: #198754 !important;
    font-weight: 600;
}

#registerModal .text-muted a:hover {
    color: #157347 !important;
    text-decoration: underline !important;
}

#registerModal .form-check-input:checked {
    background-color: #198754;
    border-color: #198754;
}

#registerModal .form-check-label a {
    color: #198754;
    font-weight: 600;
}

#registerModal .form-check-label a:hover {
    color: #157347;
}

/* Forgot password modal — zielone jak login/rejestracja */
#forgotPasswordModal .btn-primary {
    background-color: #e8f5e8;
    border: 1px solid #198754;
    color: #198754;
    border-radius: 8px;
    font-weight: 500;
    padding: 12px 24px;
    font-size: 1rem;
    transition: all 0.2s ease;
}

#forgotPasswordModal .btn-primary:hover {
    background-color: #d4edda;
    border-color: #157347;
    color: #157347;
}

#forgotPasswordModal .btn-primary:focus,
#forgotPasswordModal .btn-primary:active {
    background-color: #d4edda;
    border-color: #157347;
    color: #157347;
    box-shadow: 0 0 0 0.2rem rgba(25, 135, 84, 0.25);
}

#forgotPasswordModal .modal-footer a {
    color: #198754 !important;
    font-weight: 700;
    transition: all 0.2s ease;
}

#forgotPasswordModal .modal-footer a:hover {
    color: #157347 !important;
    text-decoration: underline !important;
}

#forgotPasswordModal .form-control:focus {
    border-color: #198754;
    box-shadow: 0 0 0 0.2rem rgba(25, 135, 84, 0.25);
}

#forgotPasswordModal .input-group-text {
    background-color: #e8f5e8;
    border-color: #198754;
    color: #198754;
}

#forgotPasswordModal .form-control.is-invalid {
    border-color: #dc3545;
}

#forgotPasswordModal .form-control.is-valid {
    border-color: #198754;
}

#forgotPasswordModal .invalid-feedback {
    display: block;
}

/* Strona ustawienia nowego hasła */
.reset-password-page .btn-primary {
    background-color: #e8f5e8;
    border: 1px solid #198754;
    color: #198754;
    border-radius: 8px;
    font-weight: 500;
    padding: 12px 24px;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.reset-password-page .btn-primary:hover {
    background-color: #d4edda;
    border-color: #157347;
    color: #157347;
}

.reset-password-page .btn-primary:focus,
.reset-password-page .btn-primary:active {
    background-color: #d4edda;
    border-color: #157347;
    color: #157347;
    box-shadow: 0 0 0 0.2rem rgba(25, 135, 84, 0.25);
}

.reset-password-page .form-control:focus {
    border-color: #198754;
    box-shadow: 0 0 0 0.2rem rgba(25, 135, 84, 0.25);
}

.reset-password-page .invalid-feedback {
    display: block;
}

/* Strona aktywacji konta — zielone przyciski jak login/rejestracja */
.activation-success-page .btn-primary,
.activation-success-page .btn-outline-primary,
.activation-error-page .btn-primary,
.activation-error-page .btn-outline-primary,
.activation-error-page .btn-outline-secondary {
    background-color: #e8f5e8;
    border: 1px solid #198754;
    color: #198754;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.activation-success-page .btn-primary:hover,
.activation-success-page .btn-primary:focus,
.activation-success-page .btn-primary:active,
.activation-success-page .btn-outline-primary:hover,
.activation-success-page .btn-outline-primary:focus,
.activation-success-page .btn-outline-primary:active,
.activation-error-page .btn-primary:hover,
.activation-error-page .btn-primary:focus,
.activation-error-page .btn-primary:active,
.activation-error-page .btn-outline-primary:hover,
.activation-error-page .btn-outline-primary:focus,
.activation-error-page .btn-outline-primary:active,
.activation-error-page .btn-outline-secondary:hover,
.activation-error-page .btn-outline-secondary:focus,
.activation-error-page .btn-outline-secondary:active {
    background-color: #d4edda;
    border-color: #157347;
    color: #157347;
    box-shadow: 0 0 0 0.2rem rgba(25, 135, 84, 0.25);
}

/* Marker Cluster Styles */
.marker-cluster {
    background-color: rgba(0, 123, 255, 0.8);
    border: 2px solid #fff;
    border-radius: 50%;
    color: #fff;
    font-weight: bold;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.marker-cluster:hover {
    background-color: rgba(0, 123, 255, 1);
    transform: scale(1.1);
}

.marker-cluster-small {
    background-color: rgba(40, 167, 69, 0.8);
    width: 40px;
    height: 40px;
    font-size: 12px;
}

.marker-cluster-medium {
    background-color: rgba(255, 193, 7, 0.8);
    width: 50px;
    height: 50px;
    font-size: 14px;
}

.marker-cluster-large {
    background-color: rgba(220, 53, 69, 0.8);
    width: 60px;
    height: 60px;
    font-size: 16px;
}

.marker-cluster div {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.marker-cluster span {
    line-height: 1;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* Profile Sidebar - Fixed Width */
.profile-sidebar {
    width: 300px;
    flex-shrink: 0;
}

.profile-sidebar .card {
    border: 1px solid #d5d5d5;
    border-radius: 8px;
    box-shadow: none;
}

.profile-content {
    flex: 1;
    min-width: 0;
}

.profile-content .card {
    border: 1px solid #d5d5d5;
    border-radius: 8px;
    box-shadow: none;
}

.profile-content .form-check-input:checked {
    background-color: #198754;
    border-color: #198754;
}

.profile-content .form-check-input:focus {
    border-color: #198754;
    box-shadow: 0 0 0 0.25rem rgba(25, 135, 84, 0.25);
}

#announcementForm .form-check-input:checked {
    background-color: #198754;
    border-color: #198754;
}

#announcementForm .form-check-input:focus {
    border-color: #198754;
    box-shadow: 0 0 0 0.25rem rgba(25, 135, 84, 0.25);
}

/* Kwoty przy etykietach wybranych pól — szara czcionka */
#announcementForm .field-with-price[data-field-name="phones"] .price-indicator,
#announcementForm .field-with-price[data-field-name="description"] .price-indicator,
#announcementForm .field-with-price[data-field-name="keywords"] .price-indicator,
#announcementForm .field-with-price[data-field-name="email"] .price-indicator,
#announcementForm .field-with-price[data-field-name="website"] .price-indicator {
    color: #d9d9d9 !important;
    font-weight: 500;
}

/* Profile sidebar header - same as content header */
.profile-sidebar .card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

.profile-sidebar .card-header .card-title {
    color: #212529 !important;
}

/* Profile sidebar body - no left/right padding */
.profile-sidebar .card-body {
    padding-left: 0;
    padding-right: 0;
}

/* Profile sidebar active link - same color as header background */
.profile-sidebar .list-group-item.active {
    background-color: #f8f9fa;
    color: #212529;
    border-color: #dee2e6;
}

/* Profile sidebar links - full width */
.profile-sidebar .list-group-item {
    width: 100%;
}

/* Toastr styling - green background, white text, no transparency */
.toast {
    opacity: 1 !important;
    background-color: #28a745 !important;
    color: #ffffff !important;
    box-shadow: none !important;
}

.toast-success {
    background-color: #28a745 !important;
    border-color: #28a745 !important;
    color: #ffffff !important;
}

.toast-error {
    background-color: #28a745 !important;
    border-color: #28a745 !important;
    color: #ffffff !important;
}

/* Toastr internal elements - white color */
.toast .toast-title,
.toast .toast-message,
.toast .toast-close-button,
.toast .toast-progress {
    color: #ffffff !important;
}

.toast .toast-close-button {
    opacity: 1 !important;
    color: #ffffff !important;
    text-shadow: none !important;
}

.toast .toast-close-button:hover {
    opacity: 0.8 !important;
    color: #ffffff !important;
}

/* Profile sidebar - first link has top border, last link has bottom border */
.profile-sidebar .list-group-item:first-child {
    border-top: 1px solid #dee2e6;
}

.profile-sidebar .list-group-item:last-child {
    border-bottom: 1px solid #dee2e6;
}

/* Below 1200px - stack layout */
@media (max-width: 1199.98px) {
    .profile-sidebar {
        width: 100%;
        margin-bottom: 1.5rem;
    }
    
    .profile-content {
        width: 100%;
    }
}

/* Mobile: equal vertical gaps between stacked profile form fields */
@media (max-width: 767.98px) {
    .profile-content form.needs-validation > .row {
        margin-bottom: 0 !important;
    }

    .profile-content form.needs-validation > .row > [class*="col-"] {
        margin-bottom: 1rem; /* same as Bootstrap mb-3 between rows on desktop */
    }

    .profile-content form.needs-validation > .row:last-child > [class*="col-"] {
        margin-bottom: 0;
    }
}

/* Badge status w Moich ogłoszeniach: tło = kolor tekstu, tekst i obramowanie = kolor dawnego tła */
.badge-status-aktualne {
    background-color: #fff;
    color: #198754;
    border: 1px solid #198754;
}
.badge-status-expired {
    background-color: #fff;
    color: #dc3545;
    border: 1px solid #dc3545;
}
.badge-status-unpaid {
    background-color: #212529;
    color: #ffc107;
    border: 1px solid #ffc107;
}

.badge-track-device-location {
    background-color: #fff;
    color: #0d6efd;
    border: 1px solid #0d6efd;
    font-weight: 500;
}

/* Moje ogłoszenia — formularz wyszukiwania i filtrów */
.my-announcements-filter-form {
    padding: 1rem;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
}

.my-announcements-filter-form .form-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #495057;
}

/* Moje ogłoszenia — lista z separatorami między pozycjami */
.announcements-list .announcement-item:not(:last-child) {
    margin-bottom: 0;
    padding-bottom: 0;
}

.announcements-list .announcement-item:not(:last-child)::after {
    content: '';
    display: block;
    width: 100%;
    height: 28px;
    margin: 1.25rem 0 1.5rem;
    background: url('../images/separator_ogloszen.png') center center / contain no-repeat;
}

/* Badge opłacone/nieopłacone — jak status Aktualne / Po terminie */
.badge-payment-status {
    flex-shrink: 0;
}
.badge-payment-paid {
    background-color: #fff;
    color: #198754;
    border: 1px solid #198754;
}
.badge-payment-unpaid,
.badge-payment-not-extended {
    background-color: #fff;
    color: #dc3545;
    border: 1px solid #dc3545;
}

/* Nagłówek karty ogłoszenia: kategoria + badge'e */
.announcement-header__top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.announcement-header__category {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    min-width: 0;
}

.announcement-header__badges {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

@media (max-width: 991.98px) {
    .announcement-header__top {
        flex-direction: column;
        align-items: flex-start;
    }

    .announcement-header__badges {
        width: 100%;
        flex-wrap: wrap;
    }
}

.btn-pay-announcement {
    background-color: #dc3545;
    color: #fff;
    border-color: #dc3545;
}

.btn-pay-announcement:hover {
    background-color: #bb2d3b;
    color: #fff;
    border-color: #b02a37;
}

/* Szczegóły ogłoszenia — linki do faktur (właściciel) */
.announcement-invoice-links a:hover {
    text-decoration: underline !important;
}

/* Dialog wielu płatności P24 (SweetAlert) */
.p24-multi-pay-list {
    max-height: 280px;
    overflow-y: auto;
}

.p24-multi-pay-row {
    cursor: pointer;
    padding: 0.35rem 0.25rem;
    border-radius: 0.25rem;
}

.p24-multi-pay-row:hover {
    background-color: #f8f9fa;
}

.p24-multi-pay-summary {
    font-size: 0.95rem;
}

/* Formularz ogłoszenia — kontener mapy węższy poniżej 1200px, 50px od krawędzi ekranu */
@media (max-width: 1199.98px) {
    #announcementForm .map-box {
        width: calc(100vw - 160px);
        max-width: 100%;
        margin-left: calc(50% - 50vw + 80px);
        box-sizing: border-box;
    }
}

/* Edycja / wybrana kategoria — pozostałe kategorie główne mniej widoczne */
#announcementForm.announcement-form--edit .announcement-category-tile:not(.active),
#announcementForm.announcement-form--category-selected .announcement-category-tile:not(.active) {
    opacity: 0.4;
    filter: grayscale(40%);
    transition: opacity 0.2s ease, filter 0.2s ease, border-color 0.2s ease;
}

#announcementForm.announcement-form--edit .announcement-category-tile:not(.active):hover,
#announcementForm.announcement-form--category-selected .announcement-category-tile:not(.active):hover {
    opacity: 0.65;
    filter: grayscale(20%);
}

#announcementForm.announcement-form--edit .announcement-category-tile.active,
#announcementForm.announcement-form--category-selected .announcement-category-tile.active {
    opacity: 1;
    filter: none;
}
