﻿/* AssetsCard.css */

/* 💡 סטיילינג מעודכן לצבעי תכלת שמיים ואפור כהה - מראה יוקרתי ונקי */
:root {
    --brand-main: #4FC3F7; /* Sky Blue */
    --brand-dark: #039BE5; /* Hover Sky */
    --brand-accent: #FF9800; /* Orange */
    --brand-accent-dark: #FB8C00;
    --bg-dark: #2A2E43;
    --bg-card: #3A405A;
    --text-main: #FFFFFF;
    --text-muted: #B0B0C0;
}

.page-header {
    /* background: linear-gradient(135deg, var(--bg-card), var(--brand-dark)); */
    display: flex;
    align-items: center;
    justify-content: space-between; /* H2 on left, links on right */
    gap: 1rem;
    border-radius: 8px;
}

    .page-header h2 {
        font-size: 1.5rem;
        font-weight: 600;
        color: var(--bg-card);
        margin: 0;
    }

.header-actions {
    display: flex;
    gap: 0.8rem;
    align-items: center;
}

.header-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: all 0.25s ease;
}

.header-actions .header-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-icon:hover {
    background: var(--brand-dark);
}

.header-icon i {
    color: #2e8b57;
    font-size: 1.2rem;
}

.header-icon img {
    width: 20px;
    height: 20px;
}


.amenities-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.5rem;
}


.amenity-chip {
    background: rgba(79, 195, 247, 0.15);
    border: 1px solid var(--brand-main);
}

    .amenity-chip i {
        color: var(--brand-main);
    }

.amenity-hidden {
    display: none;
}


.amenities-toolbar {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.amenity-filter-btn {
    padding: 4px 10px;
    border-radius: 20px;
    border: 1px solid #4FC3F7;
    background: transparent;
    color: white;
    cursor: pointer;
    font-size: 0.75rem;
}

    .amenity-filter-btn.selected {
        background: #4FC3F7;
        color: #000;
    }

.amenity-filter-box .amenity-chip {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    border: 1px solid #4FC3F7;
    background: rgba(79,195,247,0.15);
    color: white;
    font-size: 0.8rem;
    cursor: pointer;
}

.amenity-filter-box input {
    display: none;
}

.amenity-filter-box label {
    transition: all 0.2s ease;
    border: 1px solid #4FC3F7;
}

.amenity-filter-box input:checked ~ i,
.amenity-filter-box input:checked ~ span {
    font-weight: 700;
}

.amenity-filter-box input:checked ~ span {
    text-decoration: underline;
}

.amenity-filter-box input:checked ~ i {
    color: #FF9800;
}

.amenity-filter-box input:checked + i,
.amenity-filter-box input:checked + span {
    font-weight: bold;
}


.amenity-filter-box input:checked ~ * {
    color: #000;
}

.amenity-filter-box input:checked {
    outline: none;
}

    .amenity-filter-box input:checked ~ span {
        background: rgba(79,195,247,0.35);
        padding: 2px 8px;
        border-radius: 12px;
    }



/* Base styles */
.asset-card {
    display: flex;
    flex-direction: column; /* Mobile-first: stack image and details */
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--bg-dark);
    background-color: var(--bg-card); /* 💡 FIX: Use the variable here! */
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

    .asset-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    }

/* Image container */
.asset-image-container {
    flex: 1 1 100%;
    position: relative;
    width: 100%;
    height: 200px; /* smaller on mobile */
    overflow: hidden;
}

    .asset-image-container img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-right: none; /* removed for mobile stacking */
    }

/* Card body */
/* .asset-body {
    flex: 1 1 100%;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
} */

.asset-body {
    position: relative; /* add this if not already set */
    flex: 1 1 100%;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.asset-header {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
    gap: 0.5rem;
    font-size: 1.2rem;
    font-weight: 600;
}

.asset-info-section {
    display: block;
    margin-top: 10px;
}

.asset-description {
    margin-bottom: 8px;
    color: white;
    font-size: 0.95rem;
    line-height: 1.4;
}

.working-hours-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}


.asset-meta {
    color: #00E5FF;
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

.working-hours {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.75rem;
}

.working-hour-box {
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 500;
}

.btn-primary {
    background-color: #03D968 !important;
    border-color: var(--brand-main) !important;
}

    .btn-primary:hover {
        background-color: #02b350 !important;
        border-color: var(--brand-main) !important;
    }

.open-box {
    background-color: #28a745;
}

.closed-box {
    background-color: #dc3545;
}

.view-btn {
    align-self: flex-end;
    margin-top: 1rem;
}

/* Pagination */
.pagination {
    margin-top: 20px;
}

    .pagination a {
        padding: 5px 10px;
        margin: 0 3px;
        text-decoration: none;
        border: 1px solid #ccc;
    }

        .pagination a.active {
            background-color: #FF9800;
            color: white;
            font-weight: bold;
        }


/* Slideshow animation */
@keyframes fade {
    0% {
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    33% {
        opacity: 1;
    }

    43% {
        opacity: 0;
    }

    100% {
        opacity: 0;
    }
}

/* Mobile slideshow without fade */
@media (max-width: 767px) {
    .asset-image-container img {
        width: 100%;
        height: 150px;
        object-fit: cover;
        border-radius: 12px 12px 0 0;
    }
}
/* Desktop layout */
@media(min-width: 768px) {
    .asset-card {
        flex-direction: row;
        height: 260px;
    }

    .asset-image-container {
        flex: 0 0 40%;
        max-width: 40%;
        height: 100%;
        border-right: 1px solid #FFB74D;
    }

    .asset-body {
        flex: 0 0 60%;
        max-width: 60%;
        padding: 1.2rem 1.5rem;
    }


    .slideshow img {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        opacity: 1;
        animation: fade 9s infinite;
    }

        .slideshow img:nth-child(1) {
            animation-delay: 0s;
        }

        .slideshow img:nth-child(2) {
            animation-delay: 3s;
        }

        .slideshow img:nth-child(3) {
            animation-delay: 6s;
        }

    /* If less than 3 images, no animation */
    .single-photo img {
        position: relative; /* normal static positioning */
        opacity: 1 !important;
        animation: none !important;
    }
}

.filter-toolbar {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    background: linear-gradient(135deg, #3A405A, #2A2E43);
    border-radius: 16px;
    padding: 1rem;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: all 0.3s ease;
}

.filter-scroll {
    display: flex;
    overflow-x: auto;
    gap: 0.8rem;
    scrollbar-width: none;
}

    .filter-scroll::-webkit-scrollbar {
        display: none;
    }

.filter-chip {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.8rem;
    border-radius: 25px;
    border: 1px solid #ddd;
    background: #f8f9fa;
    cursor: pointer;
    transition: all 0.25s ease;
    font-size: 0.9rem;
    text-transform: capitalize;
}

    .filter-chip.selected {
        background: var(--brand-main);
        color: #000;
    }

    .filter-chip:hover {
        transform: scale(1.08);
        background: #039BE5;
    }

.filter-controls {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}


    @media (min-width: 768px) {
        /* 🖥 Desktop: put everything on one line */
        .filter-toolbar {
            flex-direction: row;
            align-items: center;
            justify-content: space-between;
            flex-wrap: wrap;
        }

        .filter-scroll {
            flex: 1;
            overflow-x: visible; /* no horizontal scroll on desktop */
            flex-wrap: wrap;
            gap: 1rem;
        }

        .filter-controls {
            flex: 0 0 auto;
            display: flex;
            align-items: center;
            gap: 0.8rem;
        }

        .form-select {
            width: 180px;
        }
    }

    @media(max-width: 767px) {
        .filter-toolbar {
            border-radius: 0;
            box-shadow: none;
            padding: 0.5rem;
        }
        .litepicker {
            width: 95% !important;
            left: 2.5% !important;
            right: 2.5% !important;
        }
    }
    /* ✅ RESTORE ROUNDED AMENITIES ON ASSET CARDS ONLY */
    .asset-card .amenities-list .amenity-chip {
        border-radius: 999px !important; /* full pill */
        padding: 6px 12px !important;
        display: inline-flex;
        align-items: center;
        gap: 6px;
        font-size: 0.75rem;
        background: rgba(79, 195, 247, 0.15);
        border: 1px solid var(--brand-main);
        color: white;
    }

        .asset-card .amenities-list .amenity-chip.amenity-hidden {
            display: none !important;
        }


        .asset-card .amenities-list .amenity-chip i {
            color: var(--brand-main);
        }

    .amenity-toggle-btn {
        background: rgba(79,195,247,0.15); /* same as chips */
        border: 1px solid var(--brand-main);
        color: var(--brand-main);
        border-radius: 20px; /* ✅ makes it rounded like chips */
        padding: 4px 12px; /* adjust for size */
        font-size: 0.75rem;
        font-weight: 600;
        cursor: pointer;
        margin-top: 4px;
        transition: all 0.2s ease;
    }

        .amenity-toggle-btn:hover {
            background: var(--brand-main);
            color: #000;
        }

    .discount-badge {
        position: absolute;
        top: 10px;
        right: 10px; /* RTL friendly */
        background: linear-gradient(135deg, #00c853, #64dd17);
        color: #000;
        font-weight: 900;
        padding: 6px 14px;
        border-radius: 999px; /* ✅ fully rounded pill */
        font-size: 0.75rem;
        box-shadow: 0 4px 10px rgba(0,0,0,0.35);
        z-index: 50;
        text-align: center;
        backdrop-filter: blur(4px);
    }


    .promotion-chip {
        display: flex;
        flex-direction: column;
        gap: 2px;
        font-size: 0.85rem;
    }

    .price-hover-overlay {
        position: absolute;
        bottom: 0;
        right: 0;
        left: 0;
        background: rgba(0,0,0,0.55);
        color: #fff;
        padding: 10px 12px;
        font-size: 0.9rem;
        display: flex;
        flex-direction: column;
        gap: 4px;
        opacity: 1; /* always visible */
        transform: translateY(0); /* no translation */
    }


    .price-line {
        display: flex;
        justify-content: space-between;
        font-weight: 600;
    }

    .price-label {
        color: #FFEB3B;
    }

    .price-value {
        font-weight: 700;
    }

        .price-value.weekend {
            color: #FF9800;
        }


    .verified-badge {
        position: absolute;
        top: 15px;
        left: 15px;
        width: 55px;
        height: 55px;
        z-index: 100; /* make sure it's above other elements */
        display: block; /* ensure it’s always displayed */
        opacity: 1; /* prevent accidental transparency */
    }

    #dateRange {
        caret-color: transparent;
    }
