/*
 * Îmbunătățiri CSS pentru stilul mobil al paginii de Search Results
 * Pentru tema Booklium - goldplay.ro
 */

/* Îmbunătățiri generale pentru mobil - tema Booklium */
@media (max-width: 767px) {
    
    /* Container principal pentru rezultatele căutării */
    .mphb_sc_search_results-wrapper .loop-room-wrapper {
        padding: 1.5rem 1rem !important;
        margin-bottom: 1.5rem;
        flex-direction: column !important;
        box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
        border-radius: 12px;
    }
    
    /* Stilizare pentru cardurile de căutare */
    .mphb_sc_search_results-wrapper .mphb-room-type {
        margin-bottom: 1.5rem;
        border-radius: 12px;
        overflow: hidden;
    }
    
    /* Imaginile camerelor pe mobil */
    .mphb_sc_search_results-wrapper .loop-room-images-wrapper {
        flex: none !important;
        width: 100% !important;
        margin: 0 0 1rem 0 !important;
        order: -1; /* Imaginea să apară prima */
    }
    
    .mphb_sc_search_results-wrapper .loop-room-images-wrapper img {
        width: 100%;
        height: 200px;
        object-fit: cover;
        border-radius: 8px;
    }
    
    .mphb_sc_search_results-wrapper .loop-room-images-wrapper .flex-viewport {
        border-radius: 8px;
        height: 200px;
    }
    
    /* Wrapper pentru informațiile camerei */
    .mphb_sc_search_results-wrapper .loop-room-info-wrapper {
        flex: none !important;
        width: 100% !important;
        margin: 0 0 1rem 0 !important;
    }
    
    /* Titlul camerei pe mobil */
    .mphb_sc_search_results-wrapper .mphb-room-type-title {
        font-size: 20px !important;
        line-height: 1.3;
        margin-bottom: 0.75rem !important;
        text-align: center;
        color: #17181a;
        font-weight: 600;
    }
    
    /* Textul descriptiv */
    .mphb_sc_search_results-wrapper .loop-room-info-wrapper p {
        font-size: 14px;
        line-height: 1.5;
        margin-bottom: 1rem;
        color: #666;
        text-align: center;
    }
    
    /* Atributele camerei custom (iconițe + text) */
    .mphb_sc_search_results-wrapper .mphb-loop-room-type-attributes {
        columns: 1 !important;
        margin-bottom: 1rem;
        padding: 0;
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .mphb_sc_search_results-wrapper .mphb-loop-room-type-attributes li {
        margin-bottom: 0;
        font-size: 14px;
        line-height: 1.4;
        display: flex;
        align-items: center;
        width: 100%;
        text-align: left;
        padding: 6px 0; /* Padding minimal fără background */
        background: none; /* Fără background */
        border: none; /* Fără border */
        border-radius: 0;
    }
    
    /* Evită suprapunerea iconițelor peste text */
    .mphb_sc_search_results-wrapper .mphb-loop-room-type-attributes li {
        position: relative !important;
        padding-left: 0 !important; /* Resetează padding-ul stâng */
    }
    
    /* Textul să înceapă după iconițe */
    .mphb_sc_search_results-wrapper .mphb-loop-room-type-attributes li .mphb-attribute-title,
    .mphb_sc_search_results-wrapper .mphb-loop-room-type-attributes li .mphb-attribute-value {
        margin-left: 0 !important;
        position: relative;
        z-index: 2; /* Textul să fie deasupra */
    }
    
    /* Iconițele să nu se suprapună */
    .mphb_sc_search_results-wrapper .mphb-loop-room-type-attributes li:before {
        position: relative !important;
        z-index: 1;
        float: none !important;
    }
    
    /* Iconițele din atribute să aibă spațiu consistent */
    .mphb_sc_search_results-wrapper .mphb-loop-room-type-attributes li:before {
        content: attr(data-icon) !important; /* Folosește iconita din CSS */
        margin-right: 8px !important; /* Spațiu între iconițe și text */
        width: 16px !important;
        height: 16px !important;
        text-align: center;
        font-size: 14px !important;
        color: #f39c12 !important; /* Galben pentru toate iconițele */
        flex-shrink: 0;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        position: relative; /* Nu permite suprapunerea */
    }
    
    /* Fix pentru atributul cu "::" (Garsoniera) */
    .mphb_sc_search_results-wrapper .mphb-loop-room-type-attributes li.mphb-room-type-apartamente:before {
        content: "\f015" !important; /* Casa icon pentru apartamente */
        font-family: "Font Awesome 5 Free" !important;
        font-weight: 900 !important;
    }
    
    /* Pentru ca textul :: să nu apară */
    .mphb_sc_search_results-wrapper .mphb-loop-room-type-attributes li.mphb-room-type-apartamente .mphb-attribute-title {
        display: none !important;
    }
    
    /* Wrapper pentru conținutul atributelor */
    .mphb_sc_search_results-wrapper .mphb-loop-room-type-attributes li .mphb-attribute-title,
    .mphb_sc_search_results-wrapper .mphb-loop-room-type-attributes li .mphb-attribute-value {
        display: inline-flex !important;
        align-items: center !important;
        vertical-align: middle;
        line-height: 1.4;
    }
    
    /* Textul din atribute să se încadreze frumos */
    .mphb_sc_search_results-wrapper .mphb-loop-room-type-attributes li .mphb-attribute-title {
        font-weight: 600;
        color: #17181a;
        margin-right: 5px;
    }
    
    /* Valorile atributelor */
    .mphb_sc_search_results-wrapper .mphb-loop-room-type-attributes li .mphb-attribute-value {
        flex: 1;
        min-width: 0;
        word-wrap: break-word;
        line-height: 1.5;
    }
    
    /* Pentru atributele custom cu valori multiple */
    .mphb_sc_search_results-wrapper .mphb-loop-room-type-attributes li a {
        color: #666;
        text-decoration: none;
        transition: color 0.3s ease;
        word-break: break-word;
    }
    
    .mphb_sc_search_results-wrapper .mphb-loop-room-type-attributes li a:hover {
        color: var(--booklium-accent-color, #3f9cc1);
    }
    
    /* Fix specific pentru structura HTML-ului de atribute */
    .mphb_sc_search_results-wrapper .mphb-loop-room-type-attributes li {
        display: flex !important;
        align-items: center !important; /* Aliniază totul pe centru pe aceeași linie */
        flex-wrap: nowrap !important; /* Nu permite wrapping */
    }
    
    .mphb_sc_search_results-wrapper .mphb-loop-room-type-attributes li > * {
        align-self: center; /* Toate elementele pe centru */
    }
    
    /* Secțiunea de booking/rezervare */
    .mphb_sc_search_results-wrapper .loop-room-book-wrapper {
        flex: none !important;
        width: 100% !important;
        margin: 0 !important;
        padding-top: 1rem;
        border-top: 1px solid #e7e4e4;
        text-align: center;
    }
    
    /* Prețurile pe mobil */
    .mphb_sc_search_results-wrapper .mphb-regular-price {
        text-align: center;
        margin-bottom: 1rem;
        font-size: 16px !important;
    }
    
    .mphb_sc_search_results-wrapper .mphb-regular-price .mphb-price {
        font-size: 24px !important;
        font-weight: 700;
        color: #17181a;
        display: block;
    }
    
    .mphb_sc_search_results-wrapper .mphb-regular-price .mphb-price-period {
        font-size: 14px !important;
        color: #666;
        display: block;
        margin-top: 0.2rem;
    }
    
    /* Butoanele pe mobil */
    .mphb_sc_search_results-wrapper .mphb-view-details-button-wrapper,
    .mphb_sc_search_results-wrapper .mphb-to-book-btn-wrapper {
        margin-bottom: 0.75rem;
        width: 100%;
    }
    
    .mphb_sc_search_results-wrapper .mphb-view-details-button-wrapper .button,
    .mphb_sc_search_results-wrapper .mphb-to-book-btn-wrapper .button,
    .mphb_sc_search_results-wrapper .mphb-book-button {
        width: 100% !important;
        padding: 14px 20px;
        font-size: 16px;
        border-radius: 8px;
        transition: all 0.3s ease;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }
    
    /* Stiluri specifice pentru butonul de rezervare */
    .mphb_sc_search_results-wrapper .mphb-book-button {
        background-color: var(--booklium-button-bg-color, #3f9cc1);
        border-color: var(--booklium-button-bg-color, #3f9cc1);
        color: #fff;
    }
    
    .mphb_sc_search_results-wrapper .mphb-book-button:hover {
        background-color: var(--booklium-accent-color, #c1b086);
        border-color: var(--booklium-accent-color, #c1b086);
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }
    
    /* Butonul de detalii */
    .mphb_sc_search_results-wrapper .mphb-view-details-button {
        background: transparent !important;
        border-color: #dadada !important;
        color: #5f6060 !important;
    }
    
    .mphb_sc_search_results-wrapper .mphb-view-details-button:hover {
        color: #fff !important;
        background: #252e59 !important;
        border-color: #252e59 !important;
    }
    
    /* Selectorul pentru cantitatea de camere */
    .mphb_sc_search_results-wrapper .mphb-rooms-quantity-wrapper {
        margin: 1rem 0;
        text-align: center;
    }
    
    .mphb_sc_search_results-wrapper .mphb-rooms-quantity-wrapper .mphb-rooms-quantity {
        max-width: 200px;
        margin: 0 auto 0.5rem auto;
        padding: 10px 15px;
        border-radius: 6px;
        border: 2px solid var(--booklium-hb-accent-color, #3f9cc1);
        font-size: 16px;
        background: #fff;
    }
    
    .mphb_sc_search_results-wrapper .mphb-rooms-quantity-wrapper .mphb-available-rooms-count {
        font-size: 13px;
        color: #666;
        margin-top: 0.5rem;
    }
    
    /* Mesajele de rezervare */
    .mphb_sc_search_results-wrapper .mphb-rooms-reservation-message-wrapper {
        margin: 1rem 0;
        border-radius: 8px;
        font-size: 14px;
        padding: 12px 16px;
        background: #f8f9fa;
        border: 1px solid #e9ecef;
    }
    
    /* Îmbunătățiri pentru slider-ul de imagini */
    .mphb_sc_search_results-wrapper .flexslider.mphb-flexslider {
        border-radius: 8px;
        overflow: hidden;
    }
    
    .mphb_sc_search_results-wrapper .flexslider .flex-direction-nav {
        opacity: 1 !important;
    }
    
    .mphb_sc_search_results-wrapper .flexslider .flex-direction-nav .flex-next,
    .mphb_sc_search_results-wrapper .flexslider .flex-direction-nav .flex-prev {
        width: 35px;
        height: 35px;
        background-color: rgba(255, 255, 255, 0.9);
        color: #333;
        border-radius: 50%;
        font-size: 14px;
    }
    
    /* Spacing îmbunătățit între elementele cardului */
    .mphb_sc_search_results-wrapper .loop-room-wrapper > * {
        margin-top: 0 !important;
        margin-left: 0 !important;
    }
    
    .mphb_sc_search_results-wrapper .loop-room-wrapper > *:not(:last-child) {
        margin-bottom: 1rem;
    }
}

/* Îmbunătățiri pentru tablete mici */
@media (min-width: 768px) and (max-width: 991px) {
    
    .mphb_sc_search_results-wrapper .loop-room-wrapper {
        padding: 2rem 1.5rem !important;
        flex-direction: column !important;
    }
    
    .mphb_sc_search_results-wrapper .loop-room-images-wrapper {
        flex: none !important;
        width: 100% !important;
        margin: 0 0 1.5rem 0 !important;
    }
    
    .mphb_sc_search_results-wrapper .loop-room-info-wrapper {
        flex: none !important;
        width: 100% !important;
        margin: 0 0 1.5rem 0 !important;
    }
    
    .mphb_sc_search_results-wrapper .loop-room-book-wrapper {
        flex: none !important;
        width: 100% !important;
        margin: 0 !important;
        padding-top: 1.5rem;
        border-top: 1px solid #e7e4e4;
    }
    
    .mphb_sc_search_results-wrapper .mphb-loop-room-type-attributes {
        columns: 2;
        column-gap: 1.5rem;
    }
}

/* Animații și efecte pentru mobil */
@media (max-width: 767px) {
    
    /* Animație pentru hover pe carduri */
    .mphb_sc_search_results-wrapper .loop-room-wrapper {
        transition: all 0.3s ease;
    }
    
    .mphb_sc_search_results-wrapper .loop-room-wrapper:hover {
        transform: translateY(-3px);
        box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    }
    
    /* Focus states pentru accesibilitate */
    .mphb_sc_search_results-wrapper .button:focus {
        outline: 2px solid var(--booklium-accent-color, #3f9cc1);
        outline-offset: 2px;
    }
    
    /* Îmbunătățiri pentru loading states */
    .mphb_sc_search_results-wrapper .mphb-preloader {
        text-align: center;
        padding: 2rem;
    }
}

/* Stiluri pentru mesajele de eroare sau informative */
@media (max-width: 767px) {
    
    .mphb_sc_search_results-wrapper .mphb-error,
    .mphb_sc_search_results-wrapper .mphb-success,
    .mphb_sc_search_results-wrapper .mphb-info {
        padding: 15px 20px;
        border-radius: 8px;
        margin-bottom: 1.5rem;
        font-size: 14px;
        line-height: 1.5;
        text-align: center;
    }
    
    .mphb_sc_search_results-wrapper .mphb-error {
        background-color: #f8d7da;
        border: 1px solid #f5c6cb;
        color: #721c24;
    }
    
    .mphb_sc_search_results-wrapper .mphb-success {
        background-color: #d4edda;
        border: 1px solid #c3e6cb;
        color: #155724;
    }
    
    .mphb_sc_search_results-wrapper .mphb-info {
        background-color: #d1ecf1;
        border: 1px solid #bee5eb;
        color: #0c5460;
    }
}

/* Optimizări pentru performanță pe mobil */
@media (max-width: 767px) {
    
    .mphb_sc_search_results-wrapper img {
        will-change: transform;
    }
    
    .mphb_sc_search_results-wrapper .button {
        will-change: transform, background-color;
    }
    
    /* Îmbunătățiri pentru touch targets */
    .mphb_sc_search_results-wrapper .button,
    .mphb_sc_search_results-wrapper .mphb-rooms-quantity {
        min-height: 44px; /* Minimum touch target size */
    }


}

/* =================================================================
   STILURI PENTRU DESKTOP - Spacing îmbunătățit pentru iconițe
   ================================================================= */
@media (min-width: 992px) {
    
    /* Ascunde atributele pe care nu le vrem pe desktop */
    .mphb_sc_search_results-wrapper .mphb-loop-room-type-attributes li.mphb-room-type-view,
    .mphb_sc_search_results-wrapper .mphb-loop-room-type-attributes li.mphb-room-type-bed-type,
    .mphb_sc_search_results-wrapper .mphb-loop-room-type-attributes li.mphb-room-type-categories,
    .mphb_sc_search_results-wrapper .mphb-loop-room-type-attributes li.mphb-room-type-facilities {
        display: none !important;
    }
    
    /* Pentru toate atributele custom pe desktop - spațiere îmbunătățită */
    .mphb_sc_search_results-wrapper .mphb-loop-room-type-attributes li.mphb-room-type-custom-attribute {
        padding: 8px 0 !important;
        line-height: 1.6 !important;
        background: none !important;
        border: none !important;
        border-radius: 0 !important;
    }
    
    /* Pentru atributul cu "::" să aibă iconită de casă pe desktop */
    .mphb_sc_search_results-wrapper .mphb-loop-room-type-attributes li.mphb-room-type-apartamente:before {
        content: "\f015" !important;
        font-family: "Font Awesome 5 Free" !important;
        font-weight: 900 !important;
        color: #f39c12 !important;
        margin-right: 8px !important; /* Spațiu pentru desktop */
        font-size: 14px !important;
        width: auto !important;
        display: inline !important;
        position: relative !important;
        float: none !important;
    }
    
    /* Ascunde titlul "::" pe desktop */
    .mphb_sc_search_results-wrapper .mphb-loop-room-type-attributes li.mphb-room-type-apartamente .mphb-attribute-title {
        display: none !important;
    }
    
    /* Pentru atributul locatie pe desktop */
    .mphb_sc_search_results-wrapper .mphb-loop-room-type-attributes li.mphb-room-type-locatie:before {
        content: "\f3c5" !important; /* Map marker icon */
        font-family: "Font Awesome 5 Free" !important;
        font-weight: 900 !important;
        color: #f39c12 !important;
        margin-right: 8px !important; /* Spațiu pentru desktop */
        font-size: 14px !important;
        width: auto !important;
        display: inline !important;
        position: relative !important;
        float: none !important;
    }
    
    /* Pentru atributul etaj pe desktop */
    .mphb_sc_search_results-wrapper .mphb-loop-room-type-attributes li.mphb-room-type-etaj:before {
        content: "\f1ad" !important; /* Building icon */
        font-family: "Font Awesome 5 Free" !important;
        font-weight: 900 !important;
        color: #f39c12 !important;
        margin-right: 8px !important; /* Spațiu pentru desktop */
        font-size: 14px !important;
        width: auto !important;
        display: inline !important;
        position: relative !important;
        float: none !important;
    }
    
    /* Textul să aibă spațiere corectă pe desktop */
    .mphb_sc_search_results-wrapper .mphb-loop-room-type-attributes li .mphb-attribute-title:not([style*="display: none"]) {
        margin-left: 0 !important;
        display: inline !important;
    }
    
    .mphb_sc_search_results-wrapper .mphb-loop-room-type-attributes li .mphb-attribute-value {
        margin-left: 0 !important;
        display: inline !important;
    }
}

/* =================================================================
   STILURI PENTRU MOBIL - Atribute custom cu iconițe
   ================================================================= */
@media (max-width: 767px) {
    
    /* Ascunde atributele pe care nu le vrem pe mobil */
    .mphb_sc_search_results-wrapper .mphb-loop-room-type-attributes li.mphb-room-type-view,
    .mphb_sc_search_results-wrapper .mphb-loop-room-type-attributes li.mphb-room-type-bed-type,
    .mphb_sc_search_results-wrapper .mphb-loop-room-type-attributes li.mphb-room-type-categories,
    .mphb_sc_search_results-wrapper .mphb-loop-room-type-attributes li.mphb-room-type-facilities {
        display: none !important;
    }
    
    /* Pentru toate atributele custom care rămân pe mobil - layout flexbox îmbunătățit */
    .mphb_sc_search_results-wrapper .mphb-loop-room-type-attributes li.mphb-room-type-custom-attribute {
        display: flex !important;
        align-items: center !important; /* Aliniază iconița cu textul pe aceeași linie */
        padding: 8px 0 !important; /* Padding redus și fără background */
        line-height: 1.4;
        background: none !important; /* Scoate background-ul galben */
        border: none !important; /* Scoate toate border-urile */
        border-radius: 0 !important;
    }
    
    /* Pentru atributul cu "::" să aibă iconită de casă pe mobil */
    .mphb_sc_search_results-wrapper .mphb-loop-room-type-attributes li.mphb-room-type-apartamente:before {
        content: "\f015" !important;
        font-family: "Font Awesome 5 Free" !important;
        font-weight: 900 !important;
        display: inline-block !important;
        width: 18px !important;
        text-align: center !important;
        margin-right: 12px !important; /* Spațiu mai mare între iconițe și text pe mobil */
        color: #f39c12 !important; /* Galben pentru iconița camerelor */
        font-size: 16px !important;
        flex-shrink: 0;
        vertical-align: middle; /* Aliniază perfect cu textul */
    }
    
    /* Ascunde titlul "::" pe mobil pentru că nu arată bine */
    .mphb_sc_search_results-wrapper .mphb-loop-room-type-attributes li.mphb-room-type-apartamente .mphb-attribute-title {
        display: none !important;
    }
    
    /* Pentru atributul locatie pe mobil */
    .mphb_sc_search_results-wrapper .mphb-loop-room-type-attributes li.mphb-room-type-locatie:before {
        content: "\f3c5" !important; /* Map marker icon */
        font-family: "Font Awesome 5 Free" !important;
        font-weight: 900 !important;
        color: #f39c12 !important; /* Galben pentru iconița locației */
        display: inline-block !important;
        width: 18px !important;
        text-align: center !important;
        margin-right: 12px !important; /* Spațiu consistent între iconițe și text pe mobil */
        font-size: 16px !important;
        flex-shrink: 0;
        vertical-align: middle; /* Aliniază perfect cu textul */
    }
    
    /* Pentru atributul etaj pe mobil */
    .mphb_sc_search_results-wrapper .mphb-loop-room-type-attributes li.mphb-room-type-etaj:before {
        content: "\f1ad" !important; /* Building icon */
        font-family: "Font Awesome 5 Free" !important;
        font-weight: 900 !important;
        color: #f39c12 !important; /* Galben pentru iconița etajului */
        display: inline-block !important;
        width: 18px !important;
        text-align: center !important;
        margin-right: 12px !important; /* Spațiu consistent între iconițe și text pe mobil */
        font-size: 16px !important;
        flex-shrink: 0;
        vertical-align: middle; /* Aliniază perfect cu textul */
    }
    
    /* Asigură-te că conținutul textual se aliniază corect pe mobil */
    .mphb_sc_search_results-wrapper .mphb-loop-room-type-attributes li .mphb-attribute-title:not([style*="display: none"]) {
        font-weight: 600;
        margin-right: 4px;
        flex-shrink: 0;
    }
    
    .mphb_sc_search_results-wrapper .mphb-loop-room-type-attributes li .mphb-attribute-value {
        flex: 1;
        min-width: 0;
        word-wrap: break-word;
        line-height: 1.4;
    }
    
    /* Pentru textul din linkuri să se încadreze frumos pe mobil */
    .mphb_sc_search_results-wrapper .mphb-loop-room-type-attributes li .mphb-attribute-value a {
        word-break: break-word;
        hyphens: auto;
        line-height: 1.4;
    }
    
    /* Stiluri pentru elementul "2 camere" care se mută în secțiunea cu oaspeți și metri pătrați pe mobil */
    .mphb_sc_search_results-wrapper .loop-room-short-attributes .dynamic-room-type {
        display: inline-flex !important;
        align-items: center !important;
        color: #f39c12 !important;
        font-weight: 600 !important;
        font-size: 14px !important;
        margin-left: 15px !important;
        white-space: nowrap;
    }
    
    .mphb_sc_search_results-wrapper .loop-room-short-attributes .dynamic-room-type i {
        color: #f39c12 !important;
        margin-right: 6px !important;
        font-size: 14px !important;
        flex-shrink: 0;
    }
    
    /* Asigură-te că secțiunea short-attributes se afișează pe o singură linie pe mobil */
    .mphb_sc_search_results-wrapper .loop-room-short-attributes {
        display: flex !important;
        flex-wrap: wrap !important;
        align-items: center !important;
        gap: 8px !important;
        margin-bottom: 1rem !important;
        justify-content: center !important; /* Centrează pe mobil */
    }
    
    .mphb_sc_search_results-wrapper .loop-room-short-attributes li {
        display: inline-flex !important;
        align-items: center !important;
        margin: 0 !important;
        white-space: nowrap;
        font-size: 14px !important;
    }
    
    /* Ascunde atributul "2 camere" din secțiunea mare de atribute pentru a evita duplicarea pe mobil */
    .mphb_sc_search_results-wrapper .mphb-loop-room-type-attributes li.mphb-room-type-apartamente {
        display: none !important;
    }
}
