/* TA BORT RUTAN LÄNGST UPP PÅ MOBILEN*/

@media only screen and (max-width: 999px) {
  body,
  #ajax-content-wrap,
  .container-wrap {
    padding-top: 0 !important;
    margin-top: 0 !important;
  }

  #header-space {
    display: none !important;
    height: 0 !important;
  }

  #top {
    margin-top: 0 !important;
  }
}

#wpadminbar {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
}

html {
  margin-top: 0 !important;
}

/*GÖR SÖKRUTAN MINDRE*/
.directorist-search-contents {
    padding-top: 0 !important;
		padding-bottom: 0 !important;
}

.directorist-search-form-wrap {
    margin-top: 0 !important;
}

.directorist-search-form-wrap .directorist-btn,
.directorist-btn,
.atbdp-btn {
    background-color: #A85D3F !important;
    border-color: #A85D3F !important;
		border-radius: 18px
!important;
    color: #ffffff !important;
}

/*Kategorier för telefonen*/
.mobile-category-slider {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 10px 20px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.mobile-category-slider::-webkit-scrollbar {
    display: none;
}

.cat-pill {
    flex: 0 0 auto;
    scroll-snap-align: start;
    
    background: #F5F1EC;
    color: #4B3A32;
    
    padding: 12px 18px;
    border-radius: 999px;
    
    font-size: 15px;
    font-weight: 600;
    
    text-decoration: none;
    
    border: 1px solid #E6DED6;
    
    transition: all 0.2s ease;
}

.cat-pill:hover {
    background: #A85D3F;
    color: white;
}

/*Sökfunktionens design*/
.atbdp-search-form,
.directorist-search-form,
.atbdp_search_form_wrapper {
    border-radius: 28px !important;
    overflow: visible !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

/* =========================================
   CATEGORY ICONS - SALIENT MOBILE FIX
========================================= */

/* VIT CIRKEL RUNT IKONER */
.category-pill .nectar_icon_wrap i,
.category-pill .icon-default-style,
.category-pill .img-with-animation-wrap {
    background: #fff !important;

    width: 70px !important;
    height: 70px !important;
    line-height: 70px !important;

    border-radius: 50% !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    margin: 0 auto 12px auto !important;

    box-shadow: 0 3px 10px rgba(0,0,0,0.06) !important;
}

/* IKON STORLEK */
.category-pill i,
.category-pill svg,
.category-pill img {
    font-size: 28px !important;
    width: 28px !important;
    height: 28px !important;
}

/* TEXT UNDER IKON */
.category-pill h4,
.category-pill p {
    text-align: center !important;
    margin-top: 10px !important;
}

/* =========================================
   MOBILE SCROLL
========================================= */

@media only screen and (max-width: 690px) {

    /* HORIZONTAL SCROLL */
    .category-scroll .vc_row-fluid,
    .category-scroll .row_col_wrap_12,
    .category-scroll .row_col_wrap_12_inner {

        display: flex !important;
        flex-wrap: nowrap !important;

        overflow-x: auto !important;
        overflow-y: hidden !important;

        -webkit-overflow-scrolling: touch !important;

        gap: 8px !important;

        padding-bottom: 10px !important;
    }

    /* GÖR KATEGORIERNA SMALARE */
    .category-scroll .wpb_column {
        flex: 0 0 120px !important;
        width: 120px !important;
        max-width: 120px !important;

        margin: 0 !important;
    }

    /* DÖLJ SCROLLBAR */
    .category-scroll ::-webkit-scrollbar {
        display: none;
    }
}

/* BLOGG-SIDA*/
.single-post #ajax-content-wrap,
.single-post .container-wrap,
.single-post .post-area {
  background-color: #ffffff !important;
}

/*same size pictures carousel*/
.directorist-gallery-carousel .directorist-gallery-carousel__item img {
     width: 100% !important;
     height: 220px;
}

/* Dölj bilden i sökförslagen */
.dir-universal-search__category-item-thumb {
    display: none !important;
}

/* Dölj directory-typen under företagsnamnet */
.dir-universal-search__category-item-type {
    display: none !important;
}

/* Låt företagsnamnet använda hela utrymmet */
.dir-universal-search__category-item-left {
    flex: 1 1 auto !important;
    min-width: 0 !important;
}

.dir-universal-search__category-item-title-wrapper {
    flex: 1 1 auto !important;
    min-width: 0 !important;
}

/* Visa hela företagsnamnet */
.dir-universal-search__category-item-title {
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: unset !important;
    max-width: none !important;
}

/* Snyggare, renare rader */
.dir-universal-search__category-item {
    padding: 2px 4px !important;
    align-items: center !important;
}

/* Behåll pilen längst till höger */
.dir-universal-search__category-item-right {
    flex: 0 0 auto !important;
    margin-left: 12px !important;
}


/* Se till att sökformuläret inte klipper dropdownen */
.directorist-search-form,
.directorist-search-form-wrap,
.directorist-search-contents {
    overflow: visible !important;
    position: relative !important;
}

/* Begränsa sökförslagens höjd */
.dir-universal-search__dropdown,
.directorist-ai-search-suggestions {
    max-height: 160px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    background: #ffffff !important;
    border-radius: 0 0 18px 18px !important;
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.12) !important;
}