/* ============================================
   FLOATING DROPDOWN - Shared Component Styles
   Description: Reusable floating dropdown for assignee selection, lists
   Used by: Tasks grid, Service tabs, and other consumers
   ============================================ */

/* ============================================================================
   ASSIGNEE DROPDOWN
   ============================================================================ */

.floating-dropdown__assignee-dropdown {
    position: fixed;
    z-index: var(--z-modal-high);
    filter: drop-shadow(0 24px 48px rgba(0, 0, 0, 0.18));
    transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.floating-dropdown__assignee-dropdown--inline {
    position: relative;
    filter: none;
    opacity: 1;
    pointer-events: auto;
}

.floating-dropdown__assignee-dropdown-inner {
    min-width: 280px;
    max-width: 340px;
    background: var(--color-card-bg);
    border: 1px solid var(--color-border);
    border-radius: 14px;
    box-shadow: 0 20px 60px -12px rgba(0, 0, 0, 0.28),
                0 0 0 1px rgba(255, 255, 255, 0.05) inset;
    overflow: hidden;
    backdrop-filter: blur(16px);
}

.floating-dropdown__assignee-dropdown--inline .floating-dropdown__assignee-dropdown-inner {
    min-width: 100%;
    max-width: none;
    box-shadow: none;
    border-radius: 10px;
}

/* Header */
.floating-dropdown__assignee-dropdown-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px 12px;
    background: linear-gradient(135deg, var(--color-surface) 0%, var(--color-card-bg) 100%);
    border-bottom: 1px solid var(--color-border);
}

.floating-dropdown__assignee-dropdown-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-text);
    letter-spacing: -0.01em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.floating-dropdown__assignee-dropdown-title::before {
    content: '\f007';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    color: var(--color-primary);
    font-size: 0.8125rem;
}

.floating-dropdown__assignee-dropdown-close {
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: var(--color-text-secondary);
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.8125rem;
}

.floating-dropdown__assignee-dropdown-close:hover {
    background: var(--color-danger);
    color: var(--color-on-danger);
    transform: rotate(90deg) scale(1.05);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

/* Search */
.floating-dropdown__assignee-dropdown-search {
    position: relative;
    padding: 10px 14px;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border-light);
}

.floating-dropdown__assignee-search-icon {
    position: absolute;
    left: 26px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-primary);
    font-size: 0.8125rem;
    transition: all 0.3s ease;
    z-index: 2;
}

.floating-dropdown__assignee-search-input {
    width: 100%;
    padding: 9px 12px 9px 34px;
    border: 2px solid var(--color-border);
    border-radius: 8px;
    background: var(--color-card-bg);
    color: var(--color-text);
    font-size: 0.8125rem;
    font-weight: 500;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.floating-dropdown__assignee-search-input:focus {
    outline: none;
    border-color: var(--color-primary);
    background: var(--color-card-bg);
    box-shadow: 0 0 0 4px rgba(var(--color-primary-rgb), 0.12),
                0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

.floating-dropdown__assignee-dropdown-search:focus-within .floating-dropdown__assignee-search-icon {
    color: var(--color-primary);
    transform: translateY(-50%) scale(1.1);
}

.floating-dropdown__assignee-search-input::placeholder {
    color: var(--color-text-secondary);
    opacity: 0.6;
    font-weight: 400;
}

/* List */
.floating-dropdown__assignee-dropdown-list {
    max-height: 320px;
    overflow-y: auto;
    padding: 6px;
    background: var(--color-card-bg);
}

.floating-dropdown__assignee-dropdown-list::-webkit-scrollbar {
    width: 8px;
}

.floating-dropdown__assignee-dropdown-list::-webkit-scrollbar-track {
    background: transparent;
    margin: 4px 0;
}

.floating-dropdown__assignee-dropdown-list::-webkit-scrollbar-thumb {
    background: var(--color-border);
    border-radius: 10px;
    border: 2px solid var(--color-card-bg);
    transition: background 0.2s ease;
}

.floating-dropdown__assignee-dropdown-list::-webkit-scrollbar-thumb:hover {
    background: var(--color-text-secondary);
}

/* Option */
.floating-dropdown__assignee-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    margin: 2px 0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    border: 2px solid transparent;
    background: transparent;
}

.floating-dropdown__assignee-option::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 8px;
    background: linear-gradient(135deg,
        rgba(var(--color-primary-rgb), 0.03),
        rgba(var(--color-primary-rgb), 0.08));
    opacity: 0;
    transition: opacity 0.25s ease;
}

.floating-dropdown__assignee-option:hover {
    background: var(--color-surface);
    transform: translateX(3px) scale(1.01);
    border-color: var(--color-border);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.06);
}

.floating-dropdown__assignee-option:hover::before {
    opacity: 1;
}

.floating-dropdown__assignee-option:active {
    transform: translateX(2px) scale(0.99);
}

.floating-dropdown__assignee-option--selected {
    background: linear-gradient(135deg,
        rgba(var(--color-primary-rgb), 0.08),
        rgba(var(--color-primary-rgb), 0.12));
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb), 0.1),
                0 4px 12px rgba(var(--color-primary-rgb), 0.15);
}

.floating-dropdown__assignee-option--selected::before {
    opacity: 0;
}

.floating-dropdown__assignee-option--empty {
    text-align: center;
    padding: 20px 14px;
    color: var(--color-text-secondary);
    font-size: 0.8125rem;
    opacity: 0.7;
}

/* Avatar */
.floating-dropdown__assignee-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.floating-dropdown__assignee-option:hover .floating-dropdown__assignee-avatar {
    transform: scale(1.08);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12),
                0 0 0 3px var(--color-card-bg);
}

.floating-dropdown__assignee-visual {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    color: var(--color-text-secondary);
    flex-shrink: 0;
    background: var(--color-surface);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08),
                0 0 0 2px var(--color-card-bg);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 1;
}

.floating-dropdown__assignee-visual--unassigned {
    background: var(--color-surface);
    color: var(--color-text-tertiary);
}

.floating-dropdown__assignee-option:hover .floating-dropdown__assignee-visual {
    transform: scale(1.08);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12),
                0 0 0 3px var(--color-card-bg);
}

.floating-dropdown__assignee-option--selected .floating-dropdown__assignee-visual {
    box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb), 0.2),
                0 4px 12px rgba(var(--color-primary-rgb), 0.2);
}

.floating-dropdown__assignee-initials {
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--color-on-primary);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
    letter-spacing: 0.02em;
}

/* Content */
.floating-dropdown__assignee-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    position: relative;
    z-index: 1;
    min-width: 0;
}

.floating-dropdown__assignee-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--color-text);
    line-height: 1.3;
    transition: color 0.2s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.floating-dropdown__assignee-option:hover .floating-dropdown__assignee-label {
    color: var(--color-primary);
}

/* Check */
.floating-dropdown__assignee-check {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-success), #16a34a);
    color: var(--color-on-success);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.625rem;
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.3);
    position: relative;
    z-index: 1;
    animation: floatingDropdownCheckBounce 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    flex-shrink: 0;
}

@keyframes floatingDropdownCheckBounce {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.15);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* ============================================================================
   LIST DROPDOWN
   ============================================================================ */

.floating-dropdown__list-dropdown {
    position: fixed;
    z-index: var(--z-modal-high);
    transition: opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.floating-dropdown__list-dropdown-inner {
    min-width: 200px;
    max-width: 280px;
    background: var(--color-card-bg);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    box-shadow: 0 16px 48px -12px rgba(0, 0, 0, 0.25),
                0 0 0 1px rgba(0, 0, 0, 0.05),
                0 0 20px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    backdrop-filter: blur(12px);
}

/* Header */
.floating-dropdown__list-dropdown-header {
    padding: 10px 14px;
    background: linear-gradient(to bottom, var(--color-surface), transparent);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.floating-dropdown__list-dropdown-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-text);
    letter-spacing: 0.3px;
}

/* Search */
.floating-dropdown__list-dropdown-search {
    position: relative;
    padding: 6px 10px;
    background: var(--color-surface);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.floating-dropdown__list-search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-text-secondary);
    font-size: 0.6875rem;
    opacity: 0.5;
}

.floating-dropdown__list-search-input {
    width: 100%;
    padding: 6px 10px 6px 28px;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    background: var(--color-input-bg);
    color: var(--color-input-text);
    font-size: 0.75rem;
    transition: all 0.2s ease;
}

.floating-dropdown__list-search-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb), 0.1);
}

.floating-dropdown__list-search-input::placeholder {
    color: var(--color-text-secondary);
    opacity: 0.5;
}

/* List */
.floating-dropdown__list-dropdown-list {
    max-height: 280px;
    overflow-y: auto;
    padding: 6px;
}

.floating-dropdown__list-dropdown-list::-webkit-scrollbar {
    width: 6px;
}

.floating-dropdown__list-dropdown-list::-webkit-scrollbar-track {
    background: transparent;
}

.floating-dropdown__list-dropdown-list::-webkit-scrollbar-thumb {
    background: var(--color-border);
    border-radius: 3px;
}

.floating-dropdown__list-dropdown-list::-webkit-scrollbar-thumb:hover {
    background: var(--color-text-tertiary);
}

/* Option */
.floating-dropdown__list-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    margin: 2px 0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
    font-size: 0.8125rem;
    background: transparent;
    position: relative;
    border: 1px solid transparent;
}

.floating-dropdown__list-option:hover {
    background: color-mix(in srgb, var(--item-color, var(--color-primary)) 10%, var(--color-surface));
    border-color: color-mix(in srgb, var(--item-color, var(--color-primary)) 25%, transparent);
    transform: translateX(2px);
}

.floating-dropdown__list-option--selected {
    background: color-mix(in srgb, var(--item-color, var(--color-primary)) 12%, var(--color-surface));
    border-color: color-mix(in srgb, var(--item-color, var(--color-primary)) 30%, transparent);
}

.floating-dropdown__list-option--empty {
    text-align: center;
    padding: 16px;
    color: var(--color-text-secondary);
    font-size: 0.8125rem;
    cursor: default;
}

.floating-dropdown__list-option--empty:hover {
    background: transparent;
    transform: none;
}

.floating-dropdown__list-option-color {
    width: 14px;
    height: 14px;
    border-radius: 4px;
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15),
                inset 0 1px 0 rgba(255, 255, 255, 0.15);
    transition: transform 0.15s ease;
}

.floating-dropdown__list-option:hover .floating-dropdown__list-option-color {
    transform: scale(1.1);
}

.floating-dropdown__list-option-icon {
    width: 16px;
    font-size: 0.75rem;
    color: var(--color-text-secondary);
    flex-shrink: 0;
}

.floating-dropdown__list-option-label {
    flex: 1;
    font-size: 0.78125rem;
    font-weight: 500;
    color: var(--color-text);
    line-height: 1.3;
}

.floating-dropdown__list-option-check {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-success), #16a34a);
    color: var(--color-on-success);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.5625rem;
    box-shadow: 0 2px 6px rgba(34, 197, 94, 0.3);
    animation: floatingDropdownCheckBounce 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    flex-shrink: 0;
}
