/**
 * Client Slider Styles
 * Styling for the client switcher carousel using Swiper
 */

/* Client slider container */
client-slider {
    display: block;
    width: 100%;
    padding: 10px 0 10px 35px;
}

/* Swiper wrapper customization */
.client-swiper {
    width: 100%;
    padding-bottom: 30px; /* Space for pagination */
}

/* Client card styling */
.client {
    padding: 10px;
    border-radius: 50px;
    transition: all 0.3s ease;
    text-align: center;
    height: 74px;
    width: 74px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative; /* For positioning expired ribbon */
}

    .client a {
        display: block;
        text-decoration: none;
        width: 100%;
    }

    .client img {
        width: 70px;
        height: auto;
        overflow-y: hidden;
        margin: -11px;
        transition: transform 0.2s ease;
        border-radius: 560px
    }

    .client:hover img {
        transform: scale(1.05);
    }

    /* Active/Expired subscription status */
    .client.active {
        background-color: #f0f8ff;
        border: 1px solid #4a90e2;
    }

    .client.expired {
        background-color: #fff5f5;
        border: 1px solid #e74c3c;
        opacity: 0.7;
        position: relative;
    }

        .client.expired img {
            filter: grayscale(50%);
        }

/* Subscription expired ribbon */
.subscription-expired-ribbon {
    position: absolute;
    bottom: 2px;
    left: -2px;
    background: url(https://d385xxgpk8p5zy.cloudfront.net/bg_subscriptionexpired.png);
    background-size: 76px;
    background-repeat: no-repeat;
    background-position: 0px 2px;
    color: #fff;
    font-size: 9px;
    line-height: 12px;
    text-align: center;
    text-transform: uppercase;
    z-index: 20;
    width: 78px;
    height: 29px;
    padding-top: 2px;
    box-sizing: border-box;
    pointer-events: none; /* Don't interfere with clicking the client logo */
}

/* Swiper pagination customization */
.client-swiper .swiper-pagination {
    bottom: 0;
}

.client-swiper .swiper-pagination-bullet {
    background: #4a90e2;
    opacity: 0.5;
}

.client-swiper .swiper-pagination-bullet-active {
    opacity: 1;
    background: #4a90e2;
}
/* No clients message */
.no-clients {
    padding: 20px;
    text-align: center;
    color: #999;
    font-style: italic;
}
/* Client search box styling */
.client-search {
    display: flex;
    gap: 5px;
    padding: 10px;
    border-bottom: 1px solid #eee;
    margin-bottom: 10px;
}

    .client-search input[type="search"] {
        flex: 1;
        padding: 8px 12px;
        border: 1px solid #ddd;
        border-radius: 4px;
        font-size: 14px;
    }

        .client-search input[type="search"]:focus {
            outline: none;
            border-color: #4a90e2;
        }

    .client-search button {
        padding: 8px 16px;
        background-color: #4a90e2;
        color: white;
        border: none;
        border-radius: 4px;
        cursor: pointer;
        font-weight: bold;
        transition: background-color 0.2s ease;
    }

        .client-search button:hover {
            background-color: #357abd;
        }

        .client-search button:active {
            background-color: #2c5fa3;
        }

.popover .popover-content .client-search {
    height: 25px;
    padding: 10px 0px 25px 0px;
    margin-bottom: 30px;
    font-size: 15px;
    display: inline-block;
}

    .popover .popover-content .client-search input {
        width: 130px !important;
        height: 30px;
        margin-left: 5px;
        padding-left: 10px;
        border-radius: 10px;
    }

    .popover .popover-content .client-search button {
        padding: 5px 10px 5px 10px;
        left: 5px;
        font-weight: bold;
    }
/* Client selector box */
#selectClientBox {
    font-style: normal;
    position: relative;
    z-index: 1000000; /* Ensure popover appears above main content */
}
/* Popover action container */
.popover-action {
    display: none;
    position: absolute;
    border-radius: 3px;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

    .popover-action.active {
        display: block;
        padding: 15px 6px 6px 0px;
        opacity: 1;
        transition: opacity 0.3s ease-in-out;
        z-index: 1000001;
    }
/* Popover base styles */
.popover {
    display: none;
    max-width: 500px;
    border-color: #efefef;
    background: #F1F1F1;
    box-shadow: 0px 0px 25px rgba(0,0,0,0.2);
    border: 1px solid #CCC;
    border-color: lightgray;
    text-align: center;
}

    .popover.active {
        display: block;
        position: relative;
        z-index: 1000002; /* Higher than all other elements */
    }
    /* Popover arrow styling */
    .popover.bottom .arrow {
        display: block;
        width: 0;
        height: 0;
        margin-top: -10px;
        margin-left: -58px !important;
        border-left: 11px solid transparent;
        border-right: 11px solid transparent;
        border-bottom: 11px solid #CCC;
        position: absolute;
        top: 0px;
        left: 58%;
    }

        .popover.bottom .arrow:after {
            top: 1px;
            margin-left: -10px;
            border-top-width: 0;
            border-bottom-color: #F1F1F1;
        }
/* Menu-specific popover styles */
.menu-items .popover {
    position: absolute;
    width: 215px;
    margin-top: 105px;
    margin-left: 10px;
    box-shadow: 10px 10px 30px rgba(0,0,0,0.2);
}

    .menu-items .popover .popover-content {
        width: 220px !important;
        padding: 0px;
    }
/* Popover content */
.popover-content {
    padding-left: 0;
    padding-right: 0;
}

.popover .popover-content a {
    display: table-cell;
    padding: 0 !important;
    vertical-align: middle;
    margin: auto;
}
/* Grid layout for Swiper slides */
.swiper-slide {
    height: auto;
}
/* Responsive adjustments */
@media (max-width: 768px) {
    .client img {
        max-width: 60px;
    }
}

@media (max-width: 480px) {
    .client img {
        max-width: 50px;
    }

    .client-search {
        flex-direction: column;
    }

        .client-search button {
            width: 100%;
        }
}
