/* ============================================================================ */
/* QUICK ACTION DROPDOWN MENUS */
/* ============================================================================ */

.quick-action-dropdown {
    position: fixed;
    background: var(--bg-elevated);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-dropdown);
    min-width: 220px;
    max-width: 280px;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    padding: var(--space-1-5);
    z-index: calc(var(--z-layer-modal) + 5);
    animation: dropdownSlideIn var(--duration-fast) var(--ease-in-out);
}

@keyframes dropdownSlideIn {
    from {
        opacity: 0;
        transform: translateY(-8px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: var(--space-2-5);
    padding: var(--space-2) var(--space-2-5);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background var(--transition-fast);
    user-select: none;
}

.dropdown-item:hover {
    background: var(--surface-hover);
}

.dropdown-item.selected {
    background: var(--accent-blue-light);
}

.dropdown-item.selected:hover {
    background: var(--accent-blue-hover);
}

.dropdown-item.selected .dropdown-label {
    color: var(--accent-blue);
}

.dropdown-item.selected .dropdown-icon {
    color: var(--accent-blue);
}

.dropdown-item:active {
    background: var(--surface-active);
    transform: scale(0.98);
}

.dropdown-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
}

.dropdown-icon svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
}

.dropdown-label {
    flex: 1;
    font-size: var(--font-size-14);
    color: var(--text-primary);
    font-weight: 500;
}

.dropdown-hint {
    font-size: var(--font-size-12);
    color: var(--text-tertiary);
    margin-left: auto;
}

.dropdown-divider {
    height: 1px;
    background: var(--border-light);
    margin: 4px 0;
}

/* Tag color dot in dropdown */
.dropdown-icon.tag-color {
    width: 14px;
    height: 14px;
    border-radius: var(--radius-circle);
}

/* Tags dropdown: empty hint */
.dropdown-empty-hint {
    padding: 8px 12px;
    color: var(--text-secondary);
    font-size: var(--font-size-12);
}

/* Tags dropdown: create tag section */
.dropdown-create-tag {
    padding: 8px;
}

.create-tag-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.create-tag-input {
    flex: 1;
    padding: 8px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: var(--font-size-12);
    background: var(--bg-primary);
    color: var(--text-primary);
    outline: none;
    font-family: var(--font-family);
}

.create-tag-input:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 2px var(--accent-blue-opacity-10);
}

.create-tag-btn {
    min-height: 32px;
    padding: 4px 12px;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--accent-fill);
    color: white;
    font-size: var(--font-size-12);
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font-family);
    transition: opacity var(--transition-fast);
}

.create-tag-btn:hover {
    opacity: 0.9;
}

.create-tag-btn:disabled,
.create-tag-btn[aria-busy="true"] {
    opacity: 0.5;
    cursor: not-allowed;
}

.create-tag-colors {
    display: flex;
    gap: 4px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.dropdown-create-tag .color-swatch {
    width: 24px;
    height: 24px;
    border-radius: var(--radius-circle);
    cursor: pointer;
    border: 2px solid transparent;
    /* 44px touch target via padding */
    padding: 8px;
    background-clip: content-box;
    box-sizing: content-box;
    transition: border-color var(--transition-fast);
}

.dropdown-create-tag .color-swatch.selected {
    border-color: var(--text-primary);
}

.dropdown-create-tag .color-swatch:hover {
    border-color: var(--text-secondary);
}

.dropdown-create-tag .color-swatch.selected:hover {
    border-color: var(--text-primary);
}

/* Tag toggle loading state */
.dropdown-item.tag-loading {
    opacity: 0.5;
    pointer-events: none;
}

/* Reduced motion for dropdown animations */
@media (prefers-reduced-motion: reduce) {
    .quick-action-dropdown {
        animation: none;
    }
    .task-quick-actions {
        transition: none;
    }
}

.dropdown-section-header {
    font-size: var(--font-size-xs);
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: var(--space-2-5) var(--space-3) 4px;
    margin-top: 4px;
}

.dropdown-custom-input {
    padding: 6px 10px;
}

.dropdown-custom-input:hover {
    background: transparent;
}

.duration-custom-input {
    width: 100%;
    padding: var(--space-2) var(--space-2-5);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-md);
    font-size: var(--font-size-14);
    font-family: var(--font-family);
    color: var(--text-primary);
    background: var(--bg-card);
    transition: all var(--transition-fast);
}

.duration-custom-input:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px var(--accent-blue-opacity-10);
}

.duration-custom-input::placeholder {
    color: var(--text-tertiary);
}

/* Tags dropdown specific styles */
.tags-dropdown {
    min-width: 240px;
}

.dropdown-search {
    padding: var(--space-1);
    margin-bottom: 2px;
}

.dropdown-search-input {
    width: 100%;
    padding: var(--space-2) var(--space-2-5);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-md);
    background: var(--surface-base);
    color: var(--text-primary);
    font-size: var(--font-size-sm);
    outline: none;
    transition: border-color var(--transition-fast);
}

.dropdown-search-input:focus {
    border-color: var(--accent-blue);
}

.dropdown-search-input::placeholder {
    color: var(--text-tertiary);
}
