
/* =====================================================
   PORTAL OGŁOSZENIOWY — DODATKOWE STYLE
   Komunikat gościa, menu, wyszukiwarka i nagłówki
===================================================== */

/* --- Komunikat dla niezalogowanych --- */

#guestLoginRow {
    display: flex;
    align-items: stretch;
    gap: 16px;
    width: 100%;
    box-sizing: border-box;
}

#guestLoginRow #loginButton {
    flex-shrink: 0;
    align-self: flex-start;
}

#guestInfo.guest-info {
    flex: 1;
    min-width: 0;
    border: 1px solid #c4b5fd;
    border-radius: 10px;
    background: #f3e8ff;
    color: #3b0764;
    box-sizing: border-box;
    padding: 9px 13px !important;
}

#guestInfo.guest-info strong {
    display: block;
    margin-bottom: 3px !important;
    font-size: 14px !important;
}

#guestInfo.guest-info p {
    margin: 0;
    font-size: 14px !important;
    line-height: 1.35 !important;
}

#guestInfo.guest-info[hidden] {
    display: none !important;
}

/* --- Menu: jednolity wygląd na telefonie i komputerze --- */

.site-header #userPanel a.my-listings-button,
.site-header #userPanel #logoutButton,
.admin-page a.my-listings-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto !important;
    min-height: 26px;
    margin: 0 !important;
    padding: 2px 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: #30313a !important;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none !important;
    white-space: nowrap;
    box-shadow: none !important;
}

.site-header #userPanel a.my-listings-button:hover {
    background: transparent !important;
    color: #6d28d9 !important;
    text-decoration: underline !important;
}

.site-header #userPanel #logoutButton {
    color: #c62828 !important;
    cursor: pointer;
}

.site-header #userPanel #logoutButton:hover {
    background: transparent !important;
    color: #a71919 !important;
    text-decoration: underline !important;
}

/* --- Układ nagłówka na dużym ekranie --- */

@media screen and (min-width: 901px) {
    .site-header {
        position: sticky;
        top: 0;
        z-index: 1000;
    }

    .site-header > .container {
        max-width: 100%;
        display: grid;
        grid-template-columns: 320px minmax(0, 1fr);
        grid-template-rows: auto auto;
        align-items: center;
    }

    .site-header .logo {
        grid-column: 1;
        grid-row: 1;
    }

    .site-header .tagline {
        grid-column: 1;
        grid-row: 2;
    }

    .site-header #userPanel {
        grid-column: 2;
        grid-row: 1 / span 2;
        display: flex;
        flex-wrap: wrap;
        justify-content: flex-end;
        align-content: center;
        align-items: center;
        gap: 4px 12px;
    }

   .site-header #userPanel #userInfo {
    flex-basis: auto;
    text-align: right;
}
}

/* Na wąskim ekranie komunikat gościa układa się pod przyciskiem */

@media (max-width: 700px) {
    #guestLoginRow {
        flex-direction: column;
        align-items: stretch;
        gap: 8px !important;
    }

    #guestLoginRow #loginButton {
        align-self: flex-start;
    }
}

/* --- Kompaktowa wyszukiwarka na większym ekranie --- */

@media screen and (min-width: 701px) {
    .search-box {
        padding: 8px 12px !important;
    }

    .search-text h2 {
        font-size: 21px !important;
        margin-bottom: 4px !important;
    }

    #searchInput,
    #searchButton,
    #clearFiltersButton {
        height: 30px !important;
        font-size: 13px !important;
    }

    #searchInput {
        padding: 0 9px !important;
    }

    #searchButton,
    #clearFiltersButton {
        padding: 0 10px !important;
    }

    .search-form {
        gap: 7px !important;
    }

    .filter-row {
        gap: 7px !important;
        margin-top: 5px !important;
    }

    .filter-row select,
    .filter-row input {
        height: 32px !important;
        padding: 0 8px !important;
        font-size: 12px !important;
    }
}

/* --- Nagłówki listy ogłoszeń --- */

h2 {
    font-size: 21px;
}

.listings-heading {
    font-size: 19px !important;
    margin-top: 0 !important;
    margin-bottom: 2px !important;
}

/* ===== MNIEJ PUSTEJ PRZESTRZENI U GÓRY STRONY ===== */

.site-header {
    padding-top: 4px !important;
    padding-bottom: 4px !important;
}

.site-header > .container {
    gap: 2px 16px !important;
}

.site-header .logo {
    font-size: 25px !important;
    line-height: 1.15 !important;
}

.site-header .tagline {
    margin-top: 3px !important;
    line-height: 1.2 !important;
}

.site-header #userPanel #userInfo {
    margin-bottom: 2px !important;
    padding-bottom: 3px !important;
}

main.container {
    padding-top: 8px !important;
}

.search-box {
    margin-top: 0 !important;
    margin-bottom: 12px !important;
    padding: 8px 10px !important;
}

.search-text h2 {
    margin-top: 0 !important;
    margin-bottom: 3px !important;
    font-size: 19px !important;
}

#listingsCount {
    margin-top: 0 !important;
    margin-bottom: 8px !important;
}

/* --- Dostosowanie nagłówka i komunikatu na telefonie --- */

@media (max-width: 700px) {
    .site-header > .container {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 8px !important;
    }

    .site-header #userPanel {
        justify-content: flex-start !important;
    }

    #guestInfo.guest-info {
        padding: 9px 11px !important;
    }
}
