/* ============================================================================
   MULTI-SELECT DROPDOWN COMPONENT STYLES
   ============================================================================ */

.multi-select-wrapper {
    position: relative;
    margin-bottom: 15px;
    width: 100%;
}

.multi-select-label {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
    color: #e0e0e0;
    font-size: 14px;
}

/* Trigger Button */
.multi-select-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: linear-gradient(145deg, #2a2a2a, #1a1a1a);
    border: 1px solid #444;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.multi-select-trigger:hover {
    border-color: #2196F3;
    box-shadow: 0 0 8px rgba(33, 150, 243, 0.3);
}

.multi-select-trigger.disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.multi-select-display {
    flex: 1;
    color: #999;
    font-size: 13px;
}

.multi-select-display.has-selection {
    color: #2196F3;
    font-weight: bold;
}

.multi-select-arrow {
    color: #999;
    font-size: 10px;
    margin-left: 8px;
}

/* Dropdown Panel */
.multi-select-panel {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 5px;
    background: linear-gradient(145deg, #2a2a2a, #1a1a1a);
    border: 2px solid #2196F3;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    max-height: 400px;
    display: flex;
    flex-direction: column;
}

/* Search Box */
.multi-select-search {
    display: flex;
    gap: 5px;
    padding: 10px;
    border-bottom: 1px solid #444;
}

.multi-select-search-input {
    flex: 1;
    padding: 8px 10px;
    background: #1a1a1a;
    border: 1px solid #444;
    border-radius: 4px;
    color: #e0e0e0;
    font-size: 13px;
}

.multi-select-search-input:focus {
    outline: none;
    border-color: #2196F3;
    box-shadow: 0 0 5px rgba(33, 150, 243, 0.3);
}

.multi-select-paste-btn {
    padding: 8px 12px;
    background: linear-gradient(145deg, #4CAF50, #388E3C);
    border: none;
    border-radius: 4px;
    color: white;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
}

.multi-select-paste-btn:hover {
    background: linear-gradient(145deg, #66BB6A, #4CAF50);
    box-shadow: 0 0 8px rgba(76, 175, 80, 0.5);
}

/* Toolbar */
.multi-select-toolbar {
    display: flex;
    gap: 5px;
    padding: 8px 10px;
    border-bottom: 1px solid #444;
    background: rgba(0, 0, 0, 0.2);
}

.multi-select-tool-btn {
    padding: 5px 10px;
    background: linear-gradient(145deg, #333, #222);
    border: 1px solid #555;
    border-radius: 4px;
    color: #e0e0e0;
    cursor: pointer;
    font-size: 11px;
    transition: all 0.3s ease;
}

.multi-select-tool-btn:hover {
    background: linear-gradient(145deg, #444, #333);
    border-color: #2196F3;
    box-shadow: 0 0 5px rgba(33, 150, 243, 0.3);
}

.multi-select-count {
    margin-left: auto;
    padding: 5px 10px;
    background: rgba(33, 150, 243, 0.2);
    border-radius: 4px;
    color: #2196F3;
    font-size: 11px;
    font-weight: bold;
}

/* Options List */
.multi-select-options {
    flex: 1;
    overflow-y: auto;
    padding: 5px;
    max-height: 250px;
}

.multi-select-options::-webkit-scrollbar {
    width: 8px;
}

.multi-select-options::-webkit-scrollbar-track {
    background: #1a1a1a;
    border-radius: 4px;
}

.multi-select-options::-webkit-scrollbar-thumb {
    background: #555;
    border-radius: 4px;
}

.multi-select-options::-webkit-scrollbar-thumb:hover {
    background: #666;
}

.multi-select-option {
    display: flex;
    align-items: center;
    padding: 8px 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.multi-select-option:hover {
    background: rgba(33, 150, 243, 0.1);
}

.multi-select-option.selected {
    background: rgba(33, 150, 243, 0.2);
}

.multi-select-option input[type="checkbox"] {
    margin-right: 8px;
    cursor: pointer;
}

.multi-select-option label {
    flex: 1;
    cursor: pointer;
    color: #e0e0e0;
    font-size: 13px;
}

.multi-select-no-options {
    padding: 20px;
    text-align: center;
    color: #999;
    font-style: italic;
}

/* Selected Values Display - Gmail-like compact style */
.multi-select-selected {
    margin-top: 6px;
    padding: 4px 6px;
    background: rgba(33, 150, 243, 0.05);
    border: 1px solid rgba(33, 150, 243, 0.2);
    border-radius: 4px;
    min-height: 28px;
}

.multi-select-selected-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
    position: relative;
}

.multi-select-selected-title {
    font-weight: 500;
    color: #2196F3;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.multi-select-copy-btn {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    padding: 0;
    background: transparent;
    border: none;
    color: rgba(33, 150, 243, 0.7);
    cursor: pointer;
    font-size: 11px;
    transition: all 0.2s ease;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.multi-select-copy-btn:hover {
    color: #2196F3;
    transform: translateY(-50%) scale(1.15);
}

.multi-select-selected-items {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    max-height: 80px;
    overflow-y: auto;
}

.multi-select-selected-items::-webkit-scrollbar {
    width: 4px;
}

.multi-select-selected-items::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 2px;
}

.multi-select-selected-items::-webkit-scrollbar-thumb {
    background: rgba(33, 150, 243, 0.4);
    border-radius: 2px;
}

/* Gmail-style compact chips */
.multi-select-selected-item {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 6px 2px 4px;
    background: rgba(33, 150, 243, 0.15);
    border: 1px solid rgba(33, 150, 243, 0.3);
    border-radius: 12px;
    font-size: 11px;
    max-width: 200px;
}

.multi-select-chip-icon {
    font-size: 10px;
    opacity: 0.8;
    flex-shrink: 0;
}

.multi-select-selected-value {
    color: #e0e0e0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.multi-select-remove-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    padding: 0;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.multi-select-remove-btn:hover {
    background: rgba(244, 67, 54, 0.3);
    color: #fff;
}

.multi-select-remove-btn:hover {
    background: rgba(255, 255, 255, 0.4);
}

/* Info Area */
.multi-select-info {
    margin-top: 5px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    color: #999;
    font-size: 12px;
    font-style: italic;
    display: none;
}

.multi-select-info.validation-message {
    display: block;
    background: rgba(76, 175, 80, 0.2);
    border: 1px solid rgba(76, 175, 80, 0.5);
    color: #81C784;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .multi-select-panel {
        max-height: 300px;
    }

    .multi-select-options {
        max-height: 180px;
    }

    .multi-select-selected-items {
        max-height: 100px;
    }
}
