﻿.custom-multiselect {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1050;
    max-height: 250px;
    overflow-y: auto;
    background: #f7f8fa;
    border: 1px solid #e6e9ee;
    border-radius: 0.75rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    padding: 0.5rem;
    transition: opacity 0.2s ease, transform 0.2s ease;
    opacity: 1;
    transform: translateY(0);
}

    .dropdown-menu[style*="display: none"] {
        opacity: 0;
        transform: translateY(-10px);
    }

.dropdown-item {
    display: flex;
    align-items: center;
    padding: 0.5rem;
    cursor: pointer;
    border-radius: 0.5rem;
    transition: background-color 0.15s ease;
    margin-bottom: 0.25rem;
}

    .dropdown-item:last-child {
        margin-bottom: 0;
    }

    .dropdown-item:hover {
        background: #f8f9fa;
    }

    .dropdown-item.selected {
        background: #e7f1ff;
        border: 1px solid #1fa2f1;
    }

    .dropdown-item input[type="checkbox"] {
        margin-right: 0.5rem;
        cursor: pointer;
        width: 1rem;
        height: 1rem;
    }

    .dropdown-item .product-info {
        flex: 1;
        cursor: pointer;
        font-family: "Hikasami-Regular";
        font-size: 0.9rem;
        color: #17181a;
    }

.selected-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
    min-height: 2.5rem;
    align-items: center;
}

    .selected-chips .chip {
        display: flex;
        align-items: center;
        background: #f3f5f8;
        border: 1px solid #e3e9f0;
        border-radius: 999px;
        padding: 0.35rem 0.65rem;
        font-size: 0.9rem;
        animation: chip-appear 0.2s ease-out;
    }

        .btn-close {
            margin-left: 0.5rem;
            font-size: 0.6rem;
            padding: 0;
            cursor: pointer;
            opacity: 0.6;
            transition: opacity 0.15s ease;
        }

            btn-close:hover {
                opacity: 1;
            }

.search-input-container {
    position: relative;
}

.search-input {
    padding-right: 2.5rem;
    border: 1px solid #e6e9ee;
    border-radius: 0.75rem;
    font-size: .9rem;
    font-family: "Hikasami-Regular";
}

    .search-input:focus {
        border-color: #1fa2f1;
        box-shadow: 0 0 0 .15rem rgba(31,162,241,.15);
    }

.clear-search {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 1rem;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.15s ease;
    padding: 0.25rem;
}

    .clear-search:hover {
        opacity: 0.8;
    }

.dropdown-footer {
    padding: 0.3rem;
    border-top: 1px solid #e6e9ee;
    background: #f8f9fa;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    border-radius: 0 0 0.5rem 0.5rem;
}

.select-all-btn {
    background: none;
    border: none;
    color: #0D6EFD;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    transition: background-color 0.15s ease;
    font-family: "Hikasami-Regular";
    font-size: 0.85rem;
}

    .select-all-btn:hover {
        background: #e7f1ff;
    }

.no-results {
    padding: 1rem;
    text-align: center;
    color: #6c757d;
    font-family: "Hikasami-Regular";
}

@keyframes chip-appear {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.dropdown-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
    z-index: 1040;
}

.dropdown-item .product-info {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: calc(100% - 2rem);
}

.selected-chips .chip span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
    display: inline-block;
}

@media (max-width:576px) {
    .switch-chips .chip {
        padding: .65rem .8rem;
    }

    .switch-chips .chip-title {
        font-size: .95rem;
    }

    .dropdown-menu {
        position: fixed;
        top: 51%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 85vw;
        max-height: 60vh;
        z-index: 1060;
    }

    .selected-all-container .form-control {
        font-size: 0.85rem;
        padding: 0.5rem 2.5rem 0.5rem 0.75rem;
        min-height: 42px;
    }

    .selected-all-container .btn-close {
        right: 0.6rem;
        font-size: 0.6rem;
        padding: 0.2rem;
    }
}

.excluded-orders-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.excluded-order-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 999px;
    font-size: 0.9rem;
}

.excluded-order-text {
    color: #6c757d;
    text-decoration: line-through;
}

.chip .custom-multiselect {
    border: none;
    background: transparent;
}

.chip .search-input-container {
    border: none;
    background: transparent;
}

.dropdown-header {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #dee2e6;
    font-weight: 500;
    background-color: #f8f9fa;
}

.dropdown-items-container {
    max-height: 200px;
    overflow-y: auto;
}

.order-number {
    font-family: "Hikasami-Regular";
    font-weight: 600;
}

@media (max-width: 576px) {
    .chip .custom-multiselect {
        width: 100%;
    }

    .chip .search-input-container .search-input {
        font-size: 0.8rem !important;
        min-height: 1.5rem;
        padding: 0.3rem 0.5rem;
    }

    .dropdown-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.3);
        z-index: 1055;
    }

    .dropdown-menu {
        position: fixed !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        width: 90vw !important;
        max-width: 320px !important;
        max-height: 70vh !important;
        z-index: 1060 !important;
        margin: 0 !important;
    }

        .dropdown-menu .input-group {
            flex-direction: column;
            gap: 0.5rem;
        }

            .dropdown-menu .input-group .form-control {
                border-radius: 0.5rem !important;
                font-size: 0.85rem;
                padding: 0.6rem 0.75rem;
            }

            .dropdown-menu .input-group .btn {
                width: 100% !important;
                height: 2.5rem;
                border-radius: 0.5rem !important;
            }

    .dropdown-items-container {
        max-height: 40vh;
        overflow-y: auto;
    }

    .dropdown-item {
        padding: 0.6rem 0.75rem;
        font-size: 0.85rem;
    }

    .dropdown-footer {
        padding: 0.6rem 0.75rem;
        font-size: 0.8rem;
    }

    .excluded-orders-container {
        gap: 0.4rem;
    }

    .excluded-order-chip {
        font-size: 0.8rem;
        padding: 0.3rem 0.5rem;
    }

    .selected-chips .chip span {
        max-width: 150px;
    }
}

@media (max-width: 360px) {
    .dropdown-menu {
        width: 95vw !important;
        max-width: 300px !important;
    }

    .selected-chips .chip span {
        max-width: 120px;
    }
}